aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-04 15:09:18 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-08 14:47:19 -0500
commitdb024adc90069ce9961f3993aba1b7372f09d77a (patch)
treebf42a6612ab7f26e6886604ba08e924dca6a28c6 /src/test
parent176ad729d9b1ddeccdb3e721b5ab1bf64646223f (diff)
downloadtor-db024adc90069ce9961f3993aba1b7372f09d77a.tar.gz
tor-db024adc90069ce9961f3993aba1b7372f09d77a.zip
Switch to a safer FREE_AND_NULL implementation
This one only evaluates the input once, so it cannot mess up even if there are side effects.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test.c2
-rw-r--r--src/test/test_dir.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test.c b/src/test/test.c
index 1c5b654df2..c08967c025 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -616,7 +616,7 @@ test_rend_fns(void *arg)
done:
if (descs) {
for (i = 0; i < smartlist_len(descs); i++)
- rend_encoded_v2_service_descriptor_free(smartlist_get(descs, i));
+ rend_encoded_v2_service_descriptor_free_(smartlist_get(descs, i));
smartlist_free(descs);
}
if (parsed)
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 4cab307ce1..35e4fb44c8 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -567,7 +567,7 @@ test_dir_routerinfo_parsing(void *arg)
static void
routerinfo_free_wrapper_(void *arg)
{
- routerinfo_free(arg);
+ routerinfo_free_(arg);
}
static void