Browse Source

Try to fix some more memory leaks in the unit tests

Nick Mathewson 9 years ago
parent
commit
8f9fb3e8fa
2 changed files with 2 additions and 1 deletions
  1. 1 1
      src/test/test_address.c
  2. 1 0
      src/test/test_config.c

+ 1 - 1
src/test/test_address.c

@@ -228,7 +228,7 @@ test_address_get_if_addrs_ifaddrs(void *arg)
 
   done:
   SMARTLIST_FOREACH(results, tor_addr_t *, t, tor_free(t));
-  tor_free(results);
+  smartlist_free(results);
   return;
 }
 

+ 1 - 0
src/test/test_config.c

@@ -176,6 +176,7 @@ test_config_addressmap(void *arg)
  done:
   config_free_lines(get_options_mutable()->AddressMap);
   get_options_mutable()->AddressMap = NULL;
+  addressmap_free_all();
 }
 
 static int