aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-02-03 15:58:48 -0500
committerNick Mathewson <nickm@torproject.org>2015-02-03 15:58:48 -0500
commitac8f235446ad1b26d9f85df10cca8ce250588b83 (patch)
tree469bbcba38b79c9c480012865766d795df0df54e /src/test
parent5be48c5d4c7339ab69b2becb6176c83d2f637f11 (diff)
downloadtor-ac8f235446ad1b26d9f85df10cca8ce250588b83.tar.gz
tor-ac8f235446ad1b26d9f85df10cca8ce250588b83.zip
fix a unit tests memory leak (my fault)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 84e80ea760..849bbdbef6 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -2994,7 +2994,6 @@ test_dir_packages(void *arg)
BAD("sha512= sha256="
"3c179f46ca77069a6a0bac70212a9b3b838b2f66129cb52d568837fc79d8fcc7");
- votes = smartlist_new();
smartlist_add(votes, tor_malloc_zero(sizeof(networkstatus_t)));
smartlist_add(votes, tor_malloc_zero(sizeof(networkstatus_t)));
smartlist_add(votes, tor_malloc_zero(sizeof(networkstatus_t)));
@@ -3097,6 +3096,7 @@ test_dir_packages(void *arg)
done:
SMARTLIST_FOREACH(votes, networkstatus_t *, ns,
{ smartlist_free(ns->package_lines); tor_free(ns); });
+ smartlist_free(votes);
tor_free(res);
}