]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Another memory leak in the tests
authorNick Mathewson <nickm@torproject.org>
Mon, 22 Feb 2016 21:20:11 +0000 (16:20 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 22 Feb 2016 21:20:11 +0000 (16:20 -0500)
src/test/test_options.c

index 1814fbf5c396d11aff20db118b211470fef11d5f..b2be8a9c65056ed412f99e89ff2627e71bc1c503 100644 (file)
@@ -242,6 +242,7 @@ test_have_enough_mem_for_dircache(void *arg)
   }
   tor_free(msg);
 
+  config_free_lines(cl); cl = NULL;
   configuration = "ORPort 8080\nDirCache 1\nBridgeRelay 1";
   r = config_get_lines(configuration, &cl, 1);
   tt_int_op(r, OP_EQ, 0);
@@ -264,6 +265,7 @@ test_have_enough_mem_for_dircache(void *arg)
   }
   tor_free(msg);
 
+  config_free_lines(cl); cl = NULL;
   configuration = "ORPort 8080\nDirCache 0";
   r = config_get_lines(configuration, &cl, 1);
   tt_int_op(r, OP_EQ, 0);
@@ -293,7 +295,7 @@ test_have_enough_mem_for_dircache(void *arg)
     tor_free(msg);
   tor_free(dflt);
   or_options_free(opt);
-  tor_free(cl);
+  config_free_lines(cl);
   return;
 }