diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-24 11:45:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-24 11:45:13 -0400 |
commit | d949589c09b2a4dd9738c6609fc6cc223672ecda (patch) | |
tree | e317a219a02db327188fe53d21f361fc527a8bb0 /src/test/test_consdiffmgr.c | |
parent | e55c1412c1d59fc05cef4e5d63f4bbbe57530ae7 (diff) | |
download | tor-d949589c09b2a4dd9738c6609fc6cc223672ecda.tar.gz tor-d949589c09b2a4dd9738c6609fc6cc223672ecda.zip |
Fix some leaks in the consdiffmgr tests
Diffstat (limited to 'src/test/test_consdiffmgr.c')
-rw-r--r-- | src/test/test_consdiffmgr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test_consdiffmgr.c b/src/test/test_consdiffmgr.c index ec4e56ccf8..2fb7dd2dfb 100644 --- a/src/test/test_consdiffmgr.c +++ b/src/test/test_consdiffmgr.c @@ -125,6 +125,7 @@ mock_cpuworker_handle_replies(void) return; SMARTLIST_FOREACH(fake_cpuworker_queue, fake_work_queue_ent_t *, ent, { ent->reply_fn(ent->arg); + tor_free(ent); }); smartlist_free(fake_cpuworker_queue); fake_cpuworker_queue = NULL; @@ -615,6 +616,10 @@ test_consdiffmgr_diff_pending(void *arg) done: UNMOCK(cpuworker_queue_work); + for (i = 0; i < N; ++i) { + tor_free(md_body[i]); + networkstatus_vote_free(md_ns[i]); + } #undef N } |