[tor-commits] [tor/maint-0.2.9] test: fix memory leak in single onion poisoning

nickm at torproject.org nickm at torproject.org
Mon Dec 12 01:40:18 UTC 2016


commit f3c040e33e8d12c62794db48c33799b43a86864a
Author: David Goulet <dgoulet at torproject.org>
Date:   Fri Dec 9 12:59:38 2016 -0500

    test: fix memory leak in single onion poisoning
    
    Closes #20938
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 src/test/test_hs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index 690e07e..8237bbc 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 = 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 */





More information about the tor-commits mailing list