Procházet zdrojové kódy

Try to fix some more memory leaks in the unit tests

Nick Mathewson před 9 roky
rodič
revize
8f9fb3e8fa
2 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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