[tor-commits] [tor/master] Fix a memory leak in build_unopened_fourhop
nickm at torproject.org
nickm at torproject.org
Wed Jan 24 17:09:11 UTC 2018
commit 2484d1eb35d9a54d0e417466148c8480a4816ab7
Author: Nick Mathewson <nickm at torproject.org>
Date: Wed Jan 24 12:08:39 2018 -0500
Fix a memory leak in build_unopened_fourhop
This is a unit-test-only leak, but let's fix it anyway so it doesn't
hide real bugs.
Bug not in any released version of Tor.
---
src/test/test_circuitstats.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/test/test_circuitstats.c b/src/test/test_circuitstats.c
index 9d87c325b..8ebef659c 100644
--- a/src/test/test_circuitstats.c
+++ b/src/test/test_circuitstats.c
@@ -82,6 +82,8 @@ build_unopened_fourhop(struct timeval circ_start_time)
onion_append_hop(&or_circ->cpath, fakehop);
onion_append_hop(&or_circ->cpath, fakehop);
+ tor_free(fakehop);
+
return or_circ;
}
More information about the tor-commits
mailing list