From aab5704d21173f9f825c016812c8099d16ea5b9f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 23 Dec 2016 14:15:49 -0500 Subject: [PATCH] lib-mail: Fix memory leak in test-istream-attachment --- src/lib-mail/test-istream-attachment.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib-mail/test-istream-attachment.c b/src/lib-mail/test-istream-attachment.c index e9376e0903..3685817b6e 100644 --- a/src/lib-mail/test-istream-attachment.c +++ b/src/lib-mail/test-istream-attachment.c @@ -188,12 +188,14 @@ static int test_close_attachment_ostream(struct ostream *output, bool success, } static int -test_close_attachment_ostream_error(struct ostream *output ATTR_UNUSED, +test_close_attachment_ostream_error(struct ostream *output, bool success, const char **error, void *context ATTR_UNUSED) { if (success) *error = "test output error"; + o_stream_ignore_last_errors(output); + o_stream_destroy(&output); return -1; }