Mercurial > dovecot > core-2.2
changeset 20579:928bc88fb37a
lib-dcrypt: Fixed test-stream unit test not to leak memory
Broken by previous change.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Thu, 04 Aug 2016 22:15:25 +0300 |
parents | 7c4c18a512a9 |
children | 550ed4230b05 |
files | src/lib-dcrypt/test-stream.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-dcrypt/test-stream.c Thu Aug 04 21:51:18 2016 +0300 +++ b/src/lib-dcrypt/test-stream.c Thu Aug 04 22:15:25 2016 +0300 @@ -194,6 +194,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 */