From c1bbc8405b8f1624d008688627303911b93e7fb0 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Fri, 4 Nov 2016 14:45:37 -0400 Subject: prop224: Fix memleaks in hs descriptor unit test Signed-off-by: David Goulet --- src/test/test_hs_descriptor.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c index 5ddb4d0594..8377a4599e 100644 --- a/src/test/test_hs_descriptor.c +++ b/src/test/test_hs_descriptor.c @@ -972,6 +972,7 @@ test_decode_plaintext(void *arg) char *plaintext; tor_asprintf(&plaintext, template, "3", bad_value, "42", "MESSAGE"); ret = hs_desc_decode_plaintext(plaintext, &desc_plaintext); + tor_free(plaintext); tt_int_op(ret, OP_EQ, -1); } @@ -980,6 +981,7 @@ test_decode_plaintext(void *arg) char *plaintext; tor_asprintf(&plaintext, template, "3", "7181615", "42", "MESSAGE"); ret = hs_desc_decode_plaintext(plaintext, &desc_plaintext); + tor_free(plaintext); tt_int_op(ret, OP_EQ, -1); } @@ -988,6 +990,7 @@ test_decode_plaintext(void *arg) char *plaintext; tor_asprintf(&plaintext, template, "3", "180", "42", bad_value); ret = hs_desc_decode_plaintext(plaintext, &desc_plaintext); + tor_free(plaintext); tt_int_op(ret, OP_EQ, -1); } @@ -996,6 +999,7 @@ test_decode_plaintext(void *arg) char *plaintext; tor_asprintf(&plaintext, template, "3", "180", bad_value, "MESSAGE"); ret = hs_desc_decode_plaintext(plaintext, &desc_plaintext); + tor_free(plaintext); tt_int_op(ret, OP_EQ, -1); } -- cgit v1.2.3-54-g00ecf