]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
memory leaks in procmon tests
authorNick Mathewson <nickm@torproject.org>
Wed, 21 Oct 2015 15:17:59 +0000 (11:17 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 21 Oct 2015 15:17:59 +0000 (11:17 -0400)
src/test/test_procmon.c

index 4eff52a14dd14565c12ec21714d073321232b40d..28551787885cf487e1e483dcf91e059d6f6d65a0 100644 (file)
@@ -33,11 +33,13 @@ test_procmon_tor_process_monitor_new(void *ignored)
                                 NULL, NULL, &msg);
   tt_assert(res);
   tt_assert(!msg);
+  tor_process_monitor_free(res);
 
   res = tor_process_monitor_new(tor_libevent_get_base(), "44 hello", 0,
                                 NULL, NULL, &msg);
   tt_assert(res);
   tt_assert(!msg);
+  tor_process_monitor_free(res);
 
   res = tor_process_monitor_new(tor_libevent_get_base(), "45:hello", 0,
                                 NULL, NULL, &msg);
@@ -45,7 +47,7 @@ test_procmon_tor_process_monitor_new(void *ignored)
   tt_assert(!msg);
 
  done:
-  (void)0;
+  tor_process_monitor_free(res);
 }
 
 struct testcase_t procmon_tests[] = {