aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_circuitstats.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-24 12:08:39 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-24 12:08:39 -0500
commit2484d1eb35d9a54d0e417466148c8480a4816ab7 (patch)
tree10cbd543099c7f98f81d94f235d20bd480da5d93 /src/test/test_circuitstats.c
parent37f26aa4700eefa59bb548065dcbb4b98add9a55 (diff)
downloadtor-2484d1eb35d9a54d0e417466148c8480a4816ab7.tar.gz
tor-2484d1eb35d9a54d0e417466148c8480a4816ab7.zip
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.
Diffstat (limited to 'src/test/test_circuitstats.c')
-rw-r--r--src/test/test_circuitstats.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_circuitstats.c b/src/test/test_circuitstats.c
index 9d87c325b4..8ebef659ca 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;
}