[asterisk-commits] jrose: branch 11 r375301 - in /branches/11: ./ main/app.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 22 15:04:05 CDT 2012


Author: jrose
Date: Mon Oct 22 15:04:02 2012
New Revision: 375301

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375301
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

Modified:
    branches/11/   (props changed)
    branches/11/main/app.c

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

Modified: branches/11/main/app.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/app.c?view=diff&rev=375301&r1=375300&r2=375301
==============================================================================
--- branches/11/main/app.c (original)
+++ branches/11/main/app.c Mon Oct 22 15:04:02 2012
@@ -1562,6 +1562,7 @@
 
 	if (!ast_strlen_zero(category) && regcomp(&regexbuf_category, category, REG_EXTENDED | REG_NOSUB)) {
 		ast_log(LOG_ERROR, "Regex compile failed on: %s\n", category);
+		regfree(&regexbuf_group);
 		return 0;
 	}
 




More information about the asterisk-commits mailing list