app_voicemail: Fix leaking config objects when msg_id doesn't match
authorJonathan Rose <jrose@digium.com>
Wed, 4 Sep 2013 21:20:02 +0000 (21:20 +0000)
committerJonathan Rose <jrose@digium.com>
Wed, 4 Sep 2013 21:20:02 +0000 (21:20 +0000)
(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

index 13e94a8..c32b781 100644 (file)
@@ -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) {