]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a leak in test_have_enough_mem_for_dircache
authorNick Mathewson <nickm@torproject.org>
Wed, 24 Feb 2016 20:06:12 +0000 (15:06 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 24 Feb 2016 20:06:12 +0000 (15:06 -0500)
src/test/test_options.c

index 547464a6c8471194d9367729ced4f398fc182443..68e8f91128736683bbdb973ca5d67ecfcaa853b7 100644 (file)
@@ -210,7 +210,7 @@ test_have_enough_mem_for_dircache(void *arg)
 {
   (void)arg;
   or_options_t *opt=NULL;
-  or_options_t *dflt;
+  or_options_t *dflt=NULL;
   config_line_t *cl=NULL;
   char *msg=NULL;;
   int r;
@@ -292,7 +292,7 @@ test_have_enough_mem_for_dircache(void *arg)
  done:
   if (msg)
     tor_free(msg);
-  tor_free(dflt);
+  or_options_free(dflt);
   or_options_free(opt);
   config_free_lines(cl);
   return;