dovecot-2.2: lib: make test-istream-failure-at not leak memory
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/416399bf1643
changeset: 19363:416399bf1643
user: Phil Carmody <phil at dovecot.fi>
date: Mon Nov 16 12:29:09 2015 +0200
description:
lib: make test-istream-failure-at not leak memory
This permits Valgrind to run without complaint.
Signed-off-by: Phil Carmody <phil at dovecot.fi>
diffstat:
src/lib/test-istream-failure-at.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r 28f088e237d9 -r 416399bf1643 src/lib/test-istream-failure-at.c
--- a/src/lib/test-istream-failure-at.c Mon Nov 16 12:27:03 2015 +0200
+++ b/src/lib/test-istream-failure-at.c Mon Nov 16 12:29:09 2015 +0200
@@ -34,6 +34,7 @@
while ((ret = i_stream_read(input)) > 0)
i_stream_skip(input, ret);
test_assert(ret == -1 && input->stream_errno == 0);
+ i_stream_destroy(&input);
/* fail at EOF */
i_stream_seek(data_input, 0);
input = i_stream_create_failure_at_eof(data_input, TEST_ERRMSG);
@@ -42,5 +43,7 @@
test_assert_idx(ret == -1 && input->v_offset == TEST_DATA_LENGTH &&
input->stream_errno == EIO &&
strcmp(i_stream_get_error(input), TEST_ERRMSG) == 0, i);
+ i_stream_destroy(&input);
+ i_stream_destroy(&data_input);
test_end();
}
More information about the dovecot-cvs
mailing list