From: Timo Sirainen Date: Fri, 23 Dec 2016 19:15:49 +0000 (-0500) Subject: lib-mail: Fix memory leak in test-istream-attachment X-Git-Tag: 2.3.0.rc1~2356 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aab5704d21173f9f825c016812c8099d16ea5b9f;p=thirdparty%2Fdovecot%2Fcore.git lib-mail: Fix memory leak in test-istream-attachment --- 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; }