Commit f9c566ec authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Fix memory leak in unittest

parent 8033152e
...@@ -345,6 +345,9 @@ static void check_deflate_inflate(nghttp2_hd_context *deflater, ...@@ -345,6 +345,9 @@ static void check_deflate_inflate(nghttp2_hd_context *deflater,
CU_ASSERT(resnvlen == (ssize_t)nvlen); CU_ASSERT(resnvlen == (ssize_t)nvlen);
assert_nv_equal(nva, resnva, nvlen); assert_nv_equal(nva, resnva, nvlen);
nghttp2_hd_end_headers(inflater); nghttp2_hd_end_headers(inflater);
free(resnva);
free(buf);
} }
void test_nghttp2_hd_deflate_inflate(void) void test_nghttp2_hd_deflate_inflate(void)
...@@ -498,4 +501,7 @@ void test_nghttp2_hd_deflate_inflate(void) ...@@ -498,4 +501,7 @@ void test_nghttp2_hd_deflate_inflate(void)
check_deflate_inflate(&deflater, &inflater, nv8, ARRLEN(nv8)); check_deflate_inflate(&deflater, &inflater, nv8, ARRLEN(nv8));
check_deflate_inflate(&deflater, &inflater, nv9, ARRLEN(nv9)); check_deflate_inflate(&deflater, &inflater, nv9, ARRLEN(nv9));
check_deflate_inflate(&deflater, &inflater, nv10, ARRLEN(nv10)); check_deflate_inflate(&deflater, &inflater, nv10, ARRLEN(nv10));
nghttp2_hd_inflate_free(&inflater);
nghttp2_hd_deflate_free(&deflater);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment