Memory leaks fix

(closes ASTERISK-22376)
Reported by: John Hardin
Patches:
     memleak.patch uploaded by jhardin (license 6512)
     memleak2.patch uploaded by jhardin (license 6512)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@397946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin Harwell
2013-08-29 21:34:52 +00:00
parent 39c984ef20
commit 4017609f8f
8 changed files with 17 additions and 4 deletions

View File

@@ -457,9 +457,11 @@ static int process_category(struct ast_config *cfg, struct aco_info *info, struc
if (!ast_strlen_zero(file->skip_category)) {
regex_skip = build_regex(file->skip_category);
if (!regexec(regex_skip, cat, 0, NULL, 0)) {
regfree(regex_skip);
ast_free(regex_skip);
return 0;
}
regfree(regex_skip);
ast_free(regex_skip);
}