[asterisk-commits] jrose: branch 10 r375300 - in /branches/10: ./ main/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 22 14:56:24 CDT 2012
Author: jrose
Date: Mon Oct 22 14:56:20 2012
New Revision: 375300
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375300
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
Modified:
branches/10/ (props changed)
branches/10/main/app.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/main/app.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/app.c?view=diff&rev=375300&r1=375299&r2=375300
==============================================================================
--- branches/10/main/app.c (original)
+++ branches/10/main/app.c Mon Oct 22 14:56:20 2012
@@ -1183,6 +1183,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