aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_nodelist.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-09-11 14:39:24 -0400
committerDavid Goulet <dgoulet@torproject.org>2017-09-11 14:39:24 -0400
commit59072d20277fe6250d0e9b6cf90bf41a75ad651c (patch)
tree9339cf8337e31e9c1931b43edd4aef4cb956e5ff /src/test/test_nodelist.c
parent52c40330c8ab0c43c5773349d033ff7e49f02f53 (diff)
downloadtor-59072d20277fe6250d0e9b6cf90bf41a75ad651c.tar.gz
tor-59072d20277fe6250d0e9b6cf90bf41a75ad651c.zip
test: Fix memleaks
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_nodelist.c')
-rw-r--r--src/test/test_nodelist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_nodelist.c b/src/test/test_nodelist.c
index db2a8fd02c..a873003d72 100644
--- a/src/test/test_nodelist.c
+++ b/src/test/test_nodelist.c
@@ -197,8 +197,8 @@ test_nodelist_ed_id(void *arg)
tor_free(ri[i]->cache_info.signing_key_cert);
tor_free(ri[i]);
}
- smartlist_free(ns->routerstatus_list);
- tor_free(ns);
+ smartlist_clear(ns->routerstatus_list);
+ networkstatus_vote_free(ns);
UNMOCK(networkstatus_get_latest_consensus);
UNMOCK(networkstatus_get_latest_consensus_by_flavor);
}