aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-03-18 09:46:39 -0400
committerNick Mathewson <nickm@torproject.org>2014-03-18 09:47:13 -0400
commit98b1aad2018b572e19d2404ea7369afa2d0c4b05 (patch)
tree25b9f0d7a3eb00b4684a9746ebf43e9a07946561 /src/test
parentd769cab3e50979807a526b3ebc5c341c13b12e97 (diff)
downloadtor-98b1aad2018b572e19d2404ea7369afa2d0c4b05.tar
tor-98b1aad2018b572e19d2404ea7369afa2d0c4b05.tar.gz
Fix a use-after-free in test_circuitlist.c
Found by clang-3.4 analyzers.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_circuitlist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_circuitlist.c b/src/test/test_circuitlist.c
index 720b40765..54aa51d3c 100644
--- a/src/test/test_circuitlist.c
+++ b/src/test/test_circuitlist.c
@@ -150,13 +150,13 @@ test_clist_maps(void *arg)
tt_assert(! circuit_id_in_use_on_channel(100, ch1));
done:
- tor_free(ch1);
- tor_free(ch2);
- tor_free(ch3);
if (or_c1)
circuit_free(TO_CIRCUIT(or_c1));
if (or_c2)
circuit_free(TO_CIRCUIT(or_c2));
+ tor_free(ch1);
+ tor_free(ch2);
+ tor_free(ch3);
UNMOCK(circuitmux_attach_circuit);
UNMOCK(circuitmux_detach_circuit);
}