dovecot-2.2: lib: fix memory leaks in failure-at streams

dovecot at dovecot.org dovecot at dovecot.org
Mon Nov 16 10:30:23 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/28f088e237d9
changeset: 19362:28f088e237d9
user:      Phil Carmody <phil at dovecot.fi>
date:      Mon Nov 16 12:27:03 2015 +0200
description:
lib: fix memory leaks in failure-at streams
The parent wasn't getting unref'ed, and would hang around for ever.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

diffstat:

 src/lib/istream-failure-at.c |  1 +
 src/lib/ostream-failure-at.c |  1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r 80a47f533fbf -r 28f088e237d9 src/lib/istream-failure-at.c
--- a/src/lib/istream-failure-at.c	Mon Nov 16 12:26:50 2015 +0200
+++ b/src/lib/istream-failure-at.c	Mon Nov 16 12:27:03 2015 +0200
@@ -16,6 +16,7 @@
 		(struct failure_at_istream *)stream;
 
 	i_free(fstream->error_string);
+	i_stream_unref(&fstream->istream.parent);
 }
 
 static ssize_t
diff -r 80a47f533fbf -r 28f088e237d9 src/lib/ostream-failure-at.c
--- a/src/lib/ostream-failure-at.c	Mon Nov 16 12:26:50 2015 +0200
+++ b/src/lib/ostream-failure-at.c	Mon Nov 16 12:27:03 2015 +0200
@@ -18,6 +18,7 @@
 		(struct failure_at_ostream *)stream;
 
 	i_free(fstream->error_string);
+	o_stream_unref(&fstream->ostream.parent);
 }
 
 static ssize_t


More information about the dovecot-cvs mailing list