aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-lock-client.c
diff options
context:
space:
mode:
author0 <NotZed@Ximian.com>2001-10-31 02:22:14 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-31 02:22:14 +0800
commitaa4d57d3e41023f2e88571135275f20cdd3dc4e7 (patch)
treee8787120c4b110bc70a47ed5316c41d6a9525a10 /camel/camel-lock-client.c
parentcccb17b0909b26e94abdf82a045d220e9dcc2cd7 (diff)
downloadgsoc2013-evolution-aa4d57d3e41023f2e88571135275f20cdd3dc4e7.tar
gsoc2013-evolution-aa4d57d3e41023f2e88571135275f20cdd3dc4e7.tar.gz
gsoc2013-evolution-aa4d57d3e41023f2e88571135275f20cdd3dc4e7.tar.bz2
gsoc2013-evolution-aa4d57d3e41023f2e88571135275f20cdd3dc4e7.tar.lz
gsoc2013-evolution-aa4d57d3e41023f2e88571135275f20cdd3dc4e7.tar.xz
gsoc2013-evolution-aa4d57d3e41023f2e88571135275f20cdd3dc4e7.tar.zst
gsoc2013-evolution-aa4d57d3e41023f2e88571135275f20cdd3dc4e7.zip
Make sure we unref the mimeparse when we're done (successfully). This was
2001-10-30 <NotZed@Ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make sure we unref the mimeparse when we're done (successfully). This was leaking an fd every get-mail! :( * camel-lock-client.c (camel_lock_helper_init): Close all fd's above 2. svn path=/trunk/; revision=14468
Diffstat (limited to 'camel/camel-lock-client.c')
-rw-r--r--camel/camel-lock-client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/camel/camel-lock-client.c b/camel/camel-lock-client.c
index b73ca68b1d..fbbed82192 100644
--- a/camel/camel-lock-client.c
+++ b/camel/camel-lock-client.c
@@ -103,6 +103,8 @@ static int write_n(int fd, void *buffer, int inlen)
static int camel_lock_helper_init(CamelException *ex)
{
+ int i;
+
if (pipe(lock_stdin_pipe) == -1
|| pipe(lock_stdout_pipe) == -1) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
@@ -131,6 +133,8 @@ static int camel_lock_helper_init(CamelException *ex)
close(lock_stdin_pipe[1]);
close(lock_stdout_pipe[0]);
close(lock_stdout_pipe[1]);
+ for (i=3;i<255;i++)
+ close(i);
execl(CAMEL_SBINDIR "/camel-lock-helper", "camel-lock-helper", NULL);
d(fprintf(stderr, "shit, couldn't exec lock helper!\n"));
/* it'll pick this up when it tries to use us */