[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix a memory leak in build_unopened_fourhop
commit 2484d1eb35d9a54d0e417466148c8480a4816ab7
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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;
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits