aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-08-19 16:21:55 -0400
committerNick Mathewson <nickm@torproject.org>2019-08-19 16:21:55 -0400
commit0bf980705ec3e5a01197615619d62091d1e1f9c8 (patch)
treebabef123b09c9d5aeefb0396c63aaf02efa26bcc /src/test/test_circuitbuild.c
parent36a27fa2d331c53802635431849ca9a400122a4e (diff)
downloadtor-0bf980705ec3e5a01197615619d62091d1e1f9c8.tar.gz
tor-0bf980705ec3e5a01197615619d62091d1e1f9c8.zip
Fix a memory-leak warning in test_circuitbuid.c
Coverity wants us to free everything that we are potentially allocating, even stuff where allocating it would be a bug. Adding a smartlist_free() here will fix the warning. Fixes bug 31452; bugfix on 16a0b7ed6779bf72a8a471c, which is not in any released Tor. This is CID 1447292.
Diffstat (limited to 'src/test/test_circuitbuild.c')
-rw-r--r--src/test/test_circuitbuild.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test_circuitbuild.c b/src/test/test_circuitbuild.c
index 196d8cd355..7291e04d6a 100644
--- a/src/test/test_circuitbuild.c
+++ b/src/test/test_circuitbuild.c
@@ -167,6 +167,7 @@ test_upgrade_from_guard_wait(void *arg)
tt_assert(!list);
done:
+ smartlist_free(list);
circuit_free(circ);
entry_guard_free_(guard);
}