diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-12-22 12:27:26 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-12-22 12:27:26 -0500 |
commit | 03d2df62f614f97d2b5cf52518565ce91333ba87 (patch) | |
tree | 0d9ae7750a5bfd29c886a3820306fdec97fbae78 /src/test/test_channeltls.c | |
parent | b94cb401d2185566e7fb52b78c5a5a6747987f99 (diff) | |
download | tor-03d2df62f614f97d2b5cf52518565ce91333ba87.tar.gz tor-03d2df62f614f97d2b5cf52518565ce91333ba87.zip |
Fix a bunch of memory leaks in the unit tests. Found with valgrind
Diffstat (limited to 'src/test/test_channeltls.c')
-rw-r--r-- | src/test/test_channeltls.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/test_channeltls.c b/src/test/test_channeltls.c index 45e24dfbec..89c75d8732 100644 --- a/src/test/test_channeltls.c +++ b/src/test/test_channeltls.c @@ -80,7 +80,7 @@ test_channeltls_create(void *arg) */ ch->close = tlschan_fake_close_method; channel_mark_for_close(ch); - tor_free(ch); + free_fake_channel(ch); UNMOCK(scheduler_release_channel); } @@ -167,7 +167,7 @@ test_channeltls_num_bytes_queued(void *arg) */ ch->close = tlschan_fake_close_method; channel_mark_for_close(ch); - tor_free(ch); + free_fake_channel(ch); UNMOCK(scheduler_release_channel); } @@ -241,7 +241,7 @@ test_channeltls_overhead_estimate(void *arg) */ ch->close = tlschan_fake_close_method; channel_mark_for_close(ch); - tor_free(ch); + free_fake_channel(ch); UNMOCK(scheduler_release_channel); } @@ -304,6 +304,7 @@ tlschan_fake_close_method(channel_t *chan) tt_assert(tlschan != NULL); /* Just free the fake orconn */ + tor_free(tlschan->conn->base_.address); tor_free(tlschan->conn); channel_closed(chan); |