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; }