diff options
author | David Goulet <dgoulet@torproject.org> | 2016-11-04 14:45:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-04 14:47:09 -0400 |
commit | c1bbc8405b8f1624d008688627303911b93e7fb0 (patch) | |
tree | 941d27909ad1263c3e6c7a13d296267ef321bfcb /src/test | |
parent | 7a78a37f1dcd88a44e9e28524afc9be2ef9531ce (diff) | |
download | tor-c1bbc8405b8f1624d008688627303911b93e7fb0.tar.gz tor-c1bbc8405b8f1624d008688627303911b93e7fb0.zip |
prop224: Fix memleaks in hs descriptor unit test
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_hs_descriptor.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |