From 64924d72bf0fce14510ec36126a1f6022bb509eb Mon Sep 17 00:00:00 2001
From: Jonathan Rose <jrose@digium.com>
Date: Wed, 4 Sep 2013 21:20:02 +0000
Subject: [PATCH] app_voicemail: Fix leaking config objects when msg_id doesn't
 match

(issues ASTERISK-22414)
Reported by: Corey Farrell
Patch:
    test_voicemail_api-leaks-11.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 398281 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398283 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_voicemail.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 13e94a8bae..c32b781844 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -15208,6 +15208,7 @@ static int message_range_and_existence_check(struct vm_state *vms, const char *m
 				DISPOSE(vms->curdir, vms->curmsg);
 				break;
 			}
+			ast_config_destroy(msg_cfg);
 			DISPOSE(vms->curdir, vms->curmsg);
 		}
 		if (!found) {
-- 
GitLab