aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sa-junk-plugin/ChangeLog5
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/plugins/sa-junk-plugin/ChangeLog b/plugins/sa-junk-plugin/ChangeLog
index 9adab6f392..9cec485bdf 100644
--- a/plugins/sa-junk-plugin/ChangeLog
+++ b/plugins/sa-junk-plugin/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-11 Jules Colding <colding@omesc.com>
+
+ * em-junk-filter.c (pipe_to_sa_full): File descriptor leaks fixed.
+ Fixes bug #437664.
+
2007-05-11 Gilles Dartiguelongue <dartigug@esiee.fr>
* em-junk-filter.c: (pipe_to_sa_full), (em_junk_sa_check_junk),
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index e60a505bd5..0cf5ff6caa 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -143,6 +143,8 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
}
if (output_buffer && pipe (out_fds) == -1) {
+ close (fds [0]);
+ close (fds [1]);
errnosav = errno;
d(printf ("failed to create a pipe (for use with spamassassin: %s\n", strerror (errno)));
errno = errnosav;
@@ -176,6 +178,10 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
errnosav = errno;
close (fds[0]);
close (fds[1]);
+ if (output_buffer) {
+ close (out_fds [0]);
+ close (out_fds [1]);
+ }
errno = errnosav;
return rv_err;
}