aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.h
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2009-09-26 15:58:54 +0200
committerNick Mathewson <nickm@torproject.org>2009-09-27 12:02:35 -0400
commita24b9e60884f6aec1bfbe8da20a02d1fdc0cd181 (patch)
treef0a976e36a183e491c9f8df4c20ecb4dc6e71b35 /src/test/test.h
parent6a68b5059710d96767a7c7c7acd6a1e0bc933874 (diff)
downloadtor-a24b9e60884f6aec1bfbe8da20a02d1fdc0cd181.tar
tor-a24b9e60884f6aec1bfbe8da20a02d1fdc0cd181.tar.gz
Fix a memleak
Found by coverity test_mem_op_hex was leaking memory, which showed up in a few tests. Also, the dir_param test had a memleak of its own. Found by Coverity
Diffstat (limited to 'src/test/test.h')
-rw-r--r--src/test/test.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test.h b/src/test/test.h
index b5076c04d..18238b330 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -58,6 +58,7 @@
tor_assert((length&1)==0); \
base16_decode(value2, length/2, hex, length); \
test_mem_op(expr1, op, value2, length/2); \
+ tor_free(value2); \
STMT_END
#define test_memeq_hex(expr1, hex) test_mem_op_hex(expr1, ==, hex)