Explorar o código

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

svn:r17577
Nick Mathewson %!s(int64=17) %!d(string=hai) anos
pai
achega
3be88b2c70
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/common/test.h

+ 2 - 0
src/common/test.h

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