diff options
author | 0 <NotZed@Ximian.com> | 2001-10-31 02:22:14 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-10-31 02:22:14 +0800 |
commit | aa4d57d3e41023f2e88571135275f20cdd3dc4e7 (patch) | |
tree | e8787120c4b110bc70a47ed5316c41d6a9525a10 | |
parent | cccb17b0909b26e94abdf82a045d220e9dcc2cd7 (diff) | |
download | gsoc2013-evolution-aa4d57d3e41023f2e88571135275f20cdd3dc4e7.tar.gz 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
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 7 | ||||
-rw-r--r-- | camel/camel-lock-client.c | 4 |
3 files changed, 14 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 02563cc235..3d7db779d8 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,12 @@ 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. + * providers/local/camel-mbox-folder.c (mbox_get_message): Remove the X-Evolution header before anyone else gets to see this private thing. Shoudl fix 11676 since we were inheriting flags from diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index 406bdf95b6..07216efb72 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -655,6 +655,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, co struct stat st; int status; off_t last = 0; + int ret = -1; fd = open (mbox, O_RDONLY); if (fd == -1) { @@ -718,10 +719,8 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, co } report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete")); - - g_free (source_url); - return 0; - + + ret = 0; fail: g_free (source_url); if (fd != -1) 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 */ |