[asterisk-commits] mmichelson: trunk r91579 - /trunk/apps/app_voicemail.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Dec 6 15:03:16 CST 2007
Author: mmichelson
Date: Thu Dec 6 15:03:15 2007
New Revision: 91579
URL: http://svn.digium.com/view/asterisk?view=rev&rev=91579
Log:
Handle allocation failure of the heard and deleted arrays of the vm_state.
(closes issue #11408, reported and patched by jaroth)
Modified:
trunk/apps/app_voicemail.c
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=91579&r1=91578&r2=91579
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Dec 6 15:03:15 2007
@@ -6947,10 +6947,14 @@
goto out;
if (!(vms.deleted = ast_calloc(vmu->maxmsg, sizeof(int)))) {
- /* TODO: Handle memory allocation failure */
+ ast_log(LOG_ERROR, "Could not allocate memory for deleted message storage!\n");
+ cmd = ast_play_and_wait(chan, "an-error-has-occured");
+ return -1;
}
if (!(vms.heard = ast_calloc(vmu->maxmsg, sizeof(int)))) {
- /* TODO: Handle memory allocation failure */
+ ast_log(LOG_ERROR, "Could not allocate memory for heard message storage!\n");
+ cmd = ast_play_and_wait(chan, "an-error-has-occured");
+ return -1;
}
/* Set language from config to override channel language */
More information about the asterisk-commits
mailing list