[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Try to fix some more memory leaks in the unit tests



commit 8f9fb3e8fae31e3c14811911f23537cfecc6b780
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Jan 23 11:35:05 2015 -0500

    Try to fix some more memory leaks in the unit tests
---
 src/test/test_address.c |    2 +-
 src/test/test_config.c  |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/test_address.c b/src/test/test_address.c
index f16f18e..f98cc12 100644
--- a/src/test/test_address.c
+++ b/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;
 }
 
diff --git a/src/test/test_config.c b/src/test/test_config.c
index b1f5017..b63b78e 100644
--- a/src/test/test_config.c
+++ b/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

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits