[asterisk-commits] kharwell: branch certified-11.2 r399516 - in /certified/branches/11.2: ./ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 20 09:32:01 CDT 2013


Author: kharwell
Date: Fri Sep 20 09:31:59 2013
New Revision: 399516

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399516
Log:
Memory leak in logger.

Fixed a memory leak discovered in the logger where a temporary string buffer
was not being freed.

Reported by: John Hardin
........

Merged revisions 399513 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    certified/branches/11.2/   (props changed)
    certified/branches/11.2/main/logger.c

Propchange: certified/branches/11.2/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: certified/branches/11.2/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/11.2/main/logger.c?view=diff&rev=399516&r1=399515&r2=399516
==============================================================================
--- certified/branches/11.2/main/logger.c (original)
+++ certified/branches/11.2/main/logger.c Fri Sep 20 09:31:59 2013
@@ -1758,6 +1758,7 @@
 	res = ast_str_set_va(&buf, 0, fmt, ap);
 	/* If the build failed then we can drop this allocated message */
 	if (res == AST_DYNSTR_BUILD_FAILED) {
+		ast_free(buf);
 		return;
 	}
 
@@ -1785,6 +1786,7 @@
 	} while (p && *p);
 
 	ast_log_callid(__LOG_VERBOSE, file, line, func, callid, "%s", ast_str_buffer(prefixed));
+	ast_free(buf);
 }
 
 void __ast_verbose(const char *file, int line, const char *func, int level, const char *fmt, ...)




More information about the asterisk-commits mailing list