From 8387e420b913932f7bb9a1bef9ac56cf18ab6016 Mon Sep 17 00:00:00 2001 From: Scott Griepentrog <sgriepentrog@digium.com> Date: Fri, 14 Feb 2014 21:53:38 +0000 Subject: [PATCH] pbx: ast_custom_function_unregister resource leak In pbx.c ast_custom_function_unregister(), a list of escalations being removed from the list wasn't being free'd creating a leak. This patch corrects that by freeing the records. Review: https://reviewboard.asterisk.org/r/3213/ Reported by: Corey Farrell Patches: acf_escalating_leak.patch uploaded by coreyfarrell (license 5909) ........ Merged revisions 408142 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408143 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pbx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main/pbx.c b/main/pbx.c index 1e5e0e2c91..b65268f5f8 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -3957,6 +3957,7 @@ int ast_custom_function_unregister(struct ast_custom_function *acf) AST_RWLIST_TRAVERSE_SAFE_BEGIN(&escalation_root, cur_escalation, list) { if (cur_escalation->acf == acf) { AST_RWLIST_REMOVE_CURRENT(list); + ast_free(cur_escalation); break; } } -- GitLab