summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-09-14 11:01:21 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-14 11:01:21 -0400
commitb08ddb60c9a2bfb133889a399d4e6d01af5a59d9 (patch)
treea1655e66568266232a93f0773c63accc1b7e1ebe
parent425f5e6d40d756dabef4354fec562c6de2c56efd (diff)
downloadtor-b08ddb60c9a2bfb133889a399d4e6d01af5a59d9.tar.gz
tor-b08ddb60c9a2bfb133889a399d4e6d01af5a59d9.zip
Ensure that dir1 and dir2 are freed at the end of poisoning test
Found by coverity.
-rw-r--r--src/test/test_hs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index a9cd315a82..fd5ab15643 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -568,6 +568,7 @@ test_single_onion_poisoning(void *arg)
service_1->directory = dir1;
service_2->directory = dir2;
+ dir1 = dir2 = NULL;
smartlist_add(services, service_1);
/* But don't add the second service yet. */
@@ -699,6 +700,8 @@ test_single_onion_poisoning(void *arg)
smartlist_free(services);
UNMOCK(get_options);
tor_free(mock_options->DataDirectory);
+ tor_free(dir1);
+ tor_free(dir2);
}
struct testcase_t hs_tests[] = {