summaryrefslogtreecommitdiff
path: root/test/regress_zlib.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-03-13 00:55:39 -0500
committerNick Mathewson <nickm@torproject.org>2010-03-13 00:56:07 -0500
commit274a7bd9a11fd25339c4b978a25367f6d5ff0238 (patch)
tree1c5f90f7d43ff7880440f64d65adf25009d98ed5 /test/regress_zlib.c
parent859af6772c8ff929ec73b862bb3b64dc0e57bada (diff)
downloadlibevent-274a7bd9a11fd25339c4b978a25367f6d5ff0238.tar.gz
Fix some memory leaks in the unit tests
These don't matter except inasmuch as they give real memory leaks a place to hide. Found with valgrind
Diffstat (limited to 'test/regress_zlib.c')
-rw-r--r--test/regress_zlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/regress_zlib.c b/test/regress_zlib.c
index d20f29f3..a301eaf3 100644
--- a/test/regress_zlib.c
+++ b/test/regress_zlib.c
@@ -275,10 +275,10 @@ test_bufferevent_zlib(void *arg)
r = inflateInit(&z_input);
/* initialize filters */
- bev1 = bufferevent_filter_new(bev1, NULL, zlib_output_filter, 0,
- zlib_deflate_free, &z_output);
+ bev1 = bufferevent_filter_new(bev1, NULL, zlib_output_filter,
+ BEV_OPT_CLOSE_ON_FREE, zlib_deflate_free, &z_output);
bev2 = bufferevent_filter_new(bev2, zlib_input_filter,
- NULL, 0, zlib_inflate_free, &z_input);
+ NULL, BEV_OPT_CLOSE_ON_FREE, zlib_inflate_free, &z_input);
bufferevent_setcb(bev1, readcb, writecb, errorcb, NULL);
bufferevent_setcb(bev2, readcb, writecb, errorcb, NULL);