]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
In test_deflate_copy(), we free the original struct but forget to free the copy stuct.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Thu, 19 Sep 2019 14:14:48 +0000 (16:14 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 19 Sep 2019 19:02:20 +0000 (21:02 +0200)
Found by msan.

test/example.c

index 4b78f21d8570f042ff687ff0cb9701bd1f5e1f55..7c17964907753bcba6a61e75b198c75faa8a0f54 100644 (file)
@@ -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");
 }
 
 /* ===========================================================================