summaryrefslogtreecommitdiff
path: root/src/test/test_hs.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-05-28 13:13:15 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-28 13:13:15 -0400
commit9f289e3b9ed4c60a2c1b1ed18ee18d9b4ce9ece9 (patch)
tree2ec92513bb633b4efc9dba1747c115932e39006b /src/test/test_hs.c
parent83ad7d2fbbac108a9e6bcb873a229a0efeea6a60 (diff)
downloadtor-9f289e3b9ed4c60a2c1b1ed18ee18d9b4ce9ece9.tar.gz
tor-9f289e3b9ed4c60a2c1b1ed18ee18d9b4ce9ece9.zip
Another test_hs leak. CID 1301383.
Diffstat (limited to 'src/test/test_hs.c')
-rw-r--r--src/test/test_hs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index 425c2b6695..6008518ba2 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -304,7 +304,7 @@ static void
test_hs_rend_data(void *arg)
{
int rep;
- rend_data_t *client;
+ rend_data_t *client = NULL;
/* Binary format of a descriptor ID. */
char desc_id[DIGEST_LEN];
char client_cookie[REND_DESC_COOKIE_LEN];
@@ -384,6 +384,7 @@ test_hs_rend_data(void *arg)
tt_int_op(tor_digest_is_zero(client->rend_pk_digest), ==, 1);
tt_int_op(tor_digest_is_zero(client->rend_cookie), ==, 1);
rend_data_free(client);
+ client = NULL;
/* Let's test the service object now. */
char rend_pk_digest[DIGEST_LEN];
@@ -429,6 +430,7 @@ test_hs_rend_data(void *arg)
done:
rend_data_free(service);
rend_data_free(service_dup);
+ rend_data_free(client);
}
struct testcase_t hs_tests[] = {