]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-test: Fix memory leak in test-ostream
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 3 Oct 2016 07:08:45 +0000 (10:08 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 13 Oct 2016 08:20:09 +0000 (10:20 +0200)
src/lib-test/test-ostream.c

index 4a5664ac7cf63c7757395c08d4af09ef367bbe48..5899af1f8e9ea5b519754951544491b5024d1f7f 100644 (file)
@@ -21,7 +21,7 @@ static void o_stream_test_destroy(struct iostream_private *stream)
        if (tstream->to != NULL)
                timeout_remove(&tstream->to);
        if (tstream->internal_buf != NULL)
-               i_free(tstream->internal_buf);
+               buffer_free(&tstream->internal_buf);
 }
 
 static int o_stream_test_flush(struct ostream_private *stream)