summaryrefslogtreecommitdiff
path: root/test/example.c
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2019-09-19 16:14:48 +0200
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-09-19 21:02:20 +0200
commit2890c0e380da194209fb71e94cdd72cb7dadb5f0 (patch)
tree5a686d159fa02ec3bc487f55a10bccad4be60fd5 /test/example.c
parentb080dd07b679c86d84cf3b4eea7ee3437e8fa0a3 (diff)
In test_deflate_copy(), we free the original struct but forget to free the copy stuct.
Found by msan.
Diffstat (limited to 'test/example.c')
-rw-r--r--test/example.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/example.c b/test/example.c
index 4b78f21..7c17964 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");
}
/* ===========================================================================