[asterisk-commits] jrose: trunk r375311 - in /trunk: ./ main/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 22 15:19:55 CDT 2012
Author: jrose
Date: Mon Oct 22 15:19:51 2012
New Revision: 375311
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375311
Log:
core: Fix a memory leak in app.c from an early return
ast_app_group_match_get_count allocates memory with the regcomp
function and we previously forgot to free it when bailing out
due to a regex compilation failure against category.
(closes issue AST-1018)
Reported by: Guenther Kelleter
Patches:
regcomp_memleak.diff uploaded by Guenther Kelleter (license 6372)
........
Merged revisions 375299 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375300 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375301 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/main/app.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/main/app.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/app.c?view=diff&rev=375311&r1=375310&r2=375311
==============================================================================
--- trunk/main/app.c (original)
+++ trunk/main/app.c Mon Oct 22 15:19:51 2012
@@ -1562,6 +1562,7 @@
if (!ast_strlen_zero(category) && regcomp(®exbuf_category, category, REG_EXTENDED | REG_NOSUB)) {
ast_log(LOG_ERROR, "Regex compile failed on: %s\n", category);
+ regfree(®exbuf_group);
return 0;
}
More information about the asterisk-commits
mailing list