aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-26 00:27:21 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-26 00:27:21 -0400
commit558becad8c766f694e60d772289ae40f0daee6b1 (patch)
tree30374aeca260cc540832664757b07cc7bb4cb6d4 /src/test
parentffffd860c94ea36970a0c60326ab7a8dc7bb9bda (diff)
downloadtor-558becad8c766f694e60d772289ae40f0daee6b1.tar
tor-558becad8c766f694e60d772289ae40f0daee6b1.tar.gz
Memory leaks in test_config_addressmap
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/test_config.c b/src/test/test_config.c
index dbb50798b..82bc92dc0 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -124,6 +124,7 @@ test_config_addressmap(void *arg)
test_assert(!addressmap_rewrite(address, sizeof(address), &expires, NULL));
/* Test top-level-domain matching a bit harder */
+ config_free_lines(get_options_mutable()->AddressMap);
addressmap_clear_configured();
strlcpy(buf, "MapAddress *.com *.torserver.exit\n"
"MapAddress *.torproject.org 1.1.1.1\n"
@@ -153,6 +154,7 @@ test_config_addressmap(void *arg)
test_streq(address, "2.2.2.2");
/* We don't support '*' as a mapping directive */
+ config_free_lines(get_options_mutable()->AddressMap);
addressmap_clear_configured();
strlcpy(buf, "MapAddress * *.torserver.exit\n", sizeof(buf));
config_get_lines(buf, &(get_options_mutable()->AddressMap), 0);
@@ -170,7 +172,8 @@ test_config_addressmap(void *arg)
#undef addressmap_rewrite
done:
- ;
+ config_free_lines(get_options_mutable()->AddressMap);
+ get_options_mutable()->AddressMap = NULL;
}
static int