From d0b4bde150ade2bc0e5ef2d5d693206778b594e2 Mon Sep 17 00:00:00 2001 From: Automerge script Date: Mon, 22 Oct 2012 20:22:59 +0000 Subject: [PATCH] Merged revisions 375300 via svnmerge from file:///srv/subversion/repos/asterisk/branches/10 ................ r375300 | jrose | 2012-10-22 14:56:20 -0500 (Mon, 22 Oct 2012) | 14 lines 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 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375321 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/app.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main/app.c b/main/app.c index c463c366d1..7a1100a70f 100644 --- a/main/app.c +++ b/main/app.c @@ -1445,6 +1445,7 @@ int ast_app_group_match_get_count(const char *groupmatch, const char *category) 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; } -- 2.47.2