[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r17577: {tor} Change test_memeq macro to not leak memory. Addresses coveri (tor/trunk/src/common)



Author: nickm
Date: 2008-12-11 01:17:54 -0500 (Thu, 11 Dec 2008)
New Revision: 17577

Modified:
   tor/trunk/src/common/test.h
Log:
Change test_memeq macro to not leak memory.  Addresses coverity CID 47.

Modified: tor/trunk/src/common/test.h
===================================================================
--- tor/trunk/src/common/test.h	2008-12-11 04:22:33 UTC (rev 17576)
+++ tor/trunk/src/common/test.h	2008-12-11 06:17:54 UTC (rev 17577)
@@ -139,6 +139,8 @@
       __LINE__,                                                 \
       PRETTY_FUNCTION,                                          \
       #expr1, #expr2, mem1, mem2);                              \
+    tor_free(mem1);                                             \
+    tor_free(mem2);                                             \
     goto done;                                                  \
   } STMT_END