aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-26 00:36:09 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-26 00:36:09 -0400
commitb4b07c17e3ecdcc30f02a7fb2968b675dd970639 (patch)
treea19bef613632dc9f0ec66785f28a0f2e90245724 /src
parent558becad8c766f694e60d772289ae40f0daee6b1 (diff)
downloadtor-b4b07c17e3ecdcc30f02a7fb2968b675dd970639.tar
tor-b4b07c17e3ecdcc30f02a7fb2968b675dd970639.tar.gz
Fix leaks in test_exit_policy_dump_to_string
Diffstat (limited to 'src')
-rw-r--r--src/test/test_policy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_policy.c b/src/test/test_policy.c
index e3e7b3673..4cdcd034b 100644
--- a/src/test/test_policy.c
+++ b/src/test/test_policy.c
@@ -394,6 +394,7 @@ test_dump_exit_policy_to_string(void *arg)
ep = router_dump_exit_policy_to_string(ri,1,1);
test_streq("accept *:*\nreject *:25\nreject 8.8.8.8:*",ep);
+ tor_free(ep);
policy_entry =
router_parse_addr_policy_item_from_string("reject6 [FC00::]/7:*",-1);
@@ -421,6 +422,7 @@ test_dump_exit_policy_to_string(void *arg)
if (ri->exit_policy) {
SMARTLIST_FOREACH(ri->exit_policy, addr_policy_t *,
entry, addr_policy_free(entry));
+ smartlist_free(ri->exit_policy);
}
tor_free(ri);
tor_free(ep);