]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix crash in app_voicemail during close_mailbox
authorMatthew Jordan <mjordan@digium.com>
Sat, 25 Feb 2012 17:22:14 +0000 (17:22 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sat, 25 Feb 2012 17:22:14 +0000 (17:22 +0000)
commitfe1a4e7a4890760a69db562422ef6eab9a878e08
treeb49ee59ce7d5f80d9bf2e1808489d91afb907b3c
parentd372c43488376e5e2871f112d5cf2a66fa9f84dc
Fix crash in app_voicemail during close_mailbox

In r354890, a memory leak in app_voicemail was fixed by properly disposing of
the allocated heard/deleted pointers.  However, there are situations,
particularly when no messages are found in a folder, where these pointers are
not allocated and not NULL.  In that case, an invalid free would be attempted,
which could crash app_voicemail.  As there are a number of code paths where
this could occur, this patch uses the number of messages detected in the folder
before it attempts to free the pointers.  This resolves the crash detected in
the Asterisk Test Suite's check_voicemail_nominal test.
........

Merged revisions 356797 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@356798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_voicemail.c