[svn-commits] jrose: branch 1.8 r401790 - /branches/1.8/tests/test_linkedlists.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Oct 24 14:54:15 CDT 2013
Author: jrose
Date: Thu Oct 24 14:54:14 2013
New Revision: 401790
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401790
Log:
test_linkedlists: Fix memory leak
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
test_linkedlists-1.8.patch uploaded by coreyfarrell (license 5909)
test_linkedlists-11up.patch uploaded by coreyfarrell (license 5909)
Modified:
branches/1.8/tests/test_linkedlists.c
Modified: branches/1.8/tests/test_linkedlists.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/tests/test_linkedlists.c?view=diff&rev=401790&r1=401789&r2=401790
==============================================================================
--- branches/1.8/tests/test_linkedlists.c (original)
+++ branches/1.8/tests/test_linkedlists.c Thu Oct 24 14:54:14 2013
@@ -65,7 +65,6 @@
#define MATCH_OR_FAIL(list, val, retbuf) \
if (list_expect(list, val, &retbuf)) { \
ast_test_status_update(test, "Expected: %s, Got: %s\n", val, ast_str_buffer(retbuf)); \
- ast_free(retbuf); \
return AST_TEST_FAIL; \
}
@@ -77,7 +76,7 @@
AST_TEST_DEFINE(single_ll_tests)
{
- struct ast_str *buf;
+ RAII_VAR(struct ast_str *, buf, NULL, ast_free);
struct test_llist test_list = { 0, };
struct test_llist other_list = { 0, };
struct test_val *bogus;
More information about the svn-commits
mailing list