]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
test: fix memory leak in single onion poisoning
authorDavid Goulet <dgoulet@torproject.org>
Fri, 9 Dec 2016 17:59:38 +0000 (12:59 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Fri, 9 Dec 2016 17:59:40 +0000 (12:59 -0500)
Closes #20938

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/test/test_hs.c

index 690e07e6f43413e2fcb9ffb596676dcc42d8bb85..8237bbc50e60390266420790ca114fe95615d773 100644 (file)
@@ -570,8 +570,8 @@ test_single_onion_poisoning(void *arg)
     tt_assert(ret == 0);
   }
 
-  service_1->directory = tor_strdup(dir1);
-  service_2->directory = tor_strdup(dir2);
+  service_1->directory = dir1;
+  service_2->directory = dir2;
   /* The services own the directory pointers now */
   dir1 = dir2 = NULL;
   /* Add port to service 1 */