From: Hans Kristian Rosbach Date: Thu, 19 Sep 2019 14:14:48 +0000 (+0200) Subject: In test_deflate_copy(), we free the original struct but forget to free the copy stuct. X-Git-Tag: 1.9.9-b1~430 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2890c0e380da194209fb71e94cdd72cb7dadb5f0;p=thirdparty%2Fzlib-ng.git In test_deflate_copy(), we free the original struct but forget to free the copy stuct. Found by msan. --- diff --git a/test/example.c b/test/example.c index 4b78f21d..7c179649 100644 --- a/test/example.c +++ b/test/example.c @@ -633,7 +633,10 @@ void test_deflate_copy(unsigned char *compr, size_t comprLen) } err = PREFIX(deflateEnd)(&c_stream); - CHECK_ERR(err, "deflateEnd"); + CHECK_ERR(err, "deflateEnd original"); + + err = PREFIX(deflateEnd)(&c_stream_copy); + CHECK_ERR(err, "deflateEnd copy"); } /* ===========================================================================