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

[or-cvs] r18094: {tor} Fix a leak memory on the failing case of test_memeq_hex (tor/trunk/src/common)



Author: nickm
Date: 2009-01-13 09:43:43 -0500 (Tue, 13 Jan 2009)
New Revision: 18094

Modified:
   tor/trunk/src/common/test.h
Log:
Fix a leak memory on the failing case of test_memeq_hex

Modified: tor/trunk/src/common/test.h
===================================================================
--- tor/trunk/src/common/test.h	2009-01-13 10:27:26 UTC (rev 18093)
+++ tor/trunk/src/common/test.h	2009-01-13 14:43:43 UTC (rev 18094)
@@ -158,6 +158,8 @@
              __LINE__,                                                  \
              PRETTY_FUNCTION,                                           \
              #expr1, _test_v2, _mem1, _test_v2);                        \
+      tor_free(_mem1);                                                  \
+      tor_free(_mem2);                                                  \
       goto done;                                                        \
     }                                                                   \
     tor_free(_mem2);                                                    \