]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_voicemail: Memory Leaks against tests
authorJonathan Rose <jrose@digium.com>
Thu, 24 Oct 2013 18:42:44 +0000 (18:42 +0000)
committerJonathan Rose <jrose@digium.com>
Thu, 24 Oct 2013 18:42:44 +0000 (18:42 +0000)
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    app_voicemail-1.8.patch uploaded by coreyfarrell (license 5909)
    app_voicemail-11up.patch uploaded by coreyfarrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@401743 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index a74106b320320f8696e8820de1d6b00c93ad7bb4..9a98b80ce61b8d07ffc937bb4b2c465999aec05d 100644 (file)
@@ -12758,6 +12758,7 @@ AST_TEST_DEFINE(test_voicemail_msgcount)
 {
        int i, j, res = AST_TEST_PASS, syserr;
        struct ast_vm_user *vmu;
+       struct ast_vm_user svm;
        struct vm_state vms;
 #ifdef IMAP_STORAGE
        struct ast_channel *chan = NULL;
@@ -12810,7 +12811,7 @@ AST_TEST_DEFINE(test_voicemail_msgcount)
        }
 #endif
 
-       if (!(vmu = find_user(NULL, testcontext, testmailbox)) &&
+       if (!(vmu = find_user(&svm, testcontext, testmailbox)) &&
                !(vmu = find_or_create(testcontext, testmailbox))) {
                ast_test_status_update(test, "Cannot create vmu structure\n");
                ast_unreplace_sigchld();