[svn-commits] kharwell: trunk r399515 - in /trunk: ./ main/logger.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Sep 20 09:26:46 CDT 2013
Author: kharwell
Date: Fri Sep 20 09:26:44 2013
New Revision: 399515
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399515
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
........
Merged revisions 399514 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/main/logger.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Fri Sep 20 09:26:44 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399100,399136,399146,399160,399197,399207,399225,399237,399247,399257,399268,399283,399294,399339,399365,399376,399404,399458,399501
+/branches/12:1-398558,398560-398577,398579-399100,399136,399146,399160,399197,399207,399225,399237,399247,399257,399268,399283,399294,399339,399365,399376,399404,399458,399501,399514
Modified: trunk/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/logger.c?view=diff&rev=399515&r1=399514&r2=399515
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Fri Sep 20 09:26:44 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 svn-commits
mailing list