[asterisk-commits] mjordan: branch certified-1.8.15 r375615 - in /certified/branches/1.8.15: ./ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 2 12:38:53 CDT 2012


Author: mjordan
Date: Fri Nov  2 12:38:50 2012
New Revision: 375615

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375615
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:
    certified/branches/1.8.15/   (props changed)
    certified/branches/1.8.15/main/app.c

Propchange: certified/branches/1.8.15/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: certified/branches/1.8.15/main/app.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/1.8.15/main/app.c?view=diff&rev=375615&r1=375614&r2=375615
==============================================================================
--- certified/branches/1.8.15/main/app.c (original)
+++ certified/branches/1.8.15/main/app.c Fri Nov  2 12:38:50 2012
@@ -1441,6 +1441,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