[asterisk-commits] kharwell: branch 12 r399514 - in /branches/12: ./ main/logger.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 20 09:25:34 CDT 2013
Author: kharwell
Date: Fri Sep 20 09:25:32 2013
New Revision: 399514
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399514
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:
branches/12/ (props changed)
branches/12/main/logger.c
Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: branches/12/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/logger.c?view=diff&rev=399514&r1=399513&r2=399514
==============================================================================
--- branches/12/main/logger.c (original)
+++ branches/12/main/logger.c Fri Sep 20 09:25:32 2013
@@ -1632,6 +1632,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;
}
@@ -1659,6 +1660,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