]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Change test_memeq macro to not leak memory. Addresses coverity CID 47.
authorNick Mathewson <nickm@torproject.org>
Thu, 11 Dec 2008 06:17:54 +0000 (06:17 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 11 Dec 2008 06:17:54 +0000 (06:17 +0000)
svn:r17577

src/common/test.h

index bb6a8ae009420a6e8788df20fd81eb36fb937a6f..b5d12ac407ec7b2862727f573804c4afc60c4676 100644 (file)
@@ -139,6 +139,8 @@ extern int have_failed;
       __LINE__,                                                 \
       PRETTY_FUNCTION,                                          \
       #expr1, #expr2, mem1, mem2);                              \
+    tor_free(mem1);                                             \
+    tor_free(mem2);                                             \
     goto done;                                                  \
   } STMT_END