From: Timo Sirainen Date: Thu, 4 Aug 2016 19:15:25 +0000 (+0300) Subject: lib-dcrypt: Fixed test-stream unit test not to leak memory X-Git-Tag: 2.2.26~422 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ddf19c6c68bd8a171dc37ca00de84fdb9287fa7;p=thirdparty%2Fdovecot%2Fcore.git lib-dcrypt: Fixed test-stream unit test not to leak memory Broken by previous change. --- diff --git a/src/lib-dcrypt/test-stream.c b/src/lib-dcrypt/test-stream.c index 00dfe0610d..b47b087bff 100644 --- a/src/lib-dcrypt/test-stream.c +++ b/src/lib-dcrypt/test-stream.c @@ -194,6 +194,7 @@ void test_write_read_v1(void) test_assert(o_stream_nfinish(os_2) == 0); test_assert(os_2->stream_errno == 0); + o_stream_unref(&os); o_stream_unref(&os_2); struct istream *is = iostream_temp_finish(&os, IO_BLOCK_SIZE); @@ -234,6 +235,7 @@ void test_write_read_v1_short(void) test_assert(o_stream_nfinish(os_2) == 0); test_assert(os_2->stream_errno == 0); + o_stream_unref(&os); o_stream_unref(&os_2); struct istream *is = iostream_temp_finish(&os, IO_BLOCK_SIZE); @@ -266,6 +268,7 @@ void test_write_read_v1_empty(void) if (os_2->stream_errno != 0) i_debug("error: %s", o_stream_get_error(os_2)); + o_stream_unref(&os); o_stream_unref(&os_2); /* this should've been enough */ @@ -301,6 +304,7 @@ void test_write_read_v2(void) if (os_2->stream_errno != 0) i_debug("error: %s", o_stream_get_error(os_2)); + o_stream_unref(&os); o_stream_unref(&os_2); struct istream *is = iostream_temp_finish(&os, IO_BLOCK_SIZE); @@ -339,6 +343,7 @@ void test_write_read_v2_short(void) if (os_2->stream_errno != 0) i_debug("error: %s", o_stream_get_error(os_2)); + o_stream_unref(&os); o_stream_unref(&os_2); struct istream *is = iostream_temp_finish(&os, IO_BLOCK_SIZE); @@ -373,6 +378,7 @@ void test_write_read_v2_empty(void) if (os_2->stream_errno != 0) i_debug("error: %s", o_stream_get_error(os_2)); + o_stream_unref(&os); o_stream_unref(&os_2); /* this should've been enough */