Browse Source

Change test_memeq macro to not leak memory. Addresses coverity CID 47.

svn:r17577
Nick Mathewson 15 years ago
parent
commit
3be88b2c70
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/common/test.h

+ 2 - 0
src/common/test.h

@@ -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