]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a memory-leak warning in test_circuitbuid.c
authorNick Mathewson <nickm@torproject.org>
Mon, 19 Aug 2019 20:21:55 +0000 (16:21 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 19 Aug 2019 20:21:55 +0000 (16:21 -0400)
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.

src/test/test_circuitbuild.c

index 196d8cd3554202d407b3661d2c3f56e0ff26248b..7291e04d6a12de4c82790a45a3eb79f579ff129d 100644 (file)
@@ -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);
 }