aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2016-12-03 06:27:32 +1100
committerteor <teor2345@gmail.com>2016-12-03 06:27:32 +1100
commitfdd368d6564e955422337af53e0723b571b8da57 (patch)
tree3d7460e6f4a6b30b7414b8d531339d11f2bb4b99 /src/test/test_hs.c
parentc100c5c69b4fd3b464b2395263e77cc6e1051ef3 (diff)
downloadtor-fdd368d6564e955422337af53e0723b571b8da57.tar.gz
tor-fdd368d6564e955422337af53e0723b571b8da57.zip
Remove a double-free in test_single_onion_poisoning
We were freeing both dir{1,2} directly, and service_{1,2}->directory via rend_service_free, even though they are the same pointer.
Diffstat (limited to 'src/test/test_hs.c')
-rw-r--r--src/test/test_hs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index 1039c64fd5..c7aaace035 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -570,8 +570,8 @@ test_single_onion_poisoning(void *arg)
tt_assert(ret == 0);
}
- service_1->directory = dir1;
- service_2->directory = dir2;
+ service_1->directory = tor_strdup(dir1);
+ service_2->directory = tor_strdup(dir2);
/* The services own the directory pointers now */
dir1 = dir2 = NULL;
/* Add port to service 1 */