From a68e10c8963cb2d4251d9923815e28ae8eeb0667 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 19 May 2008 19:39:20 +0000 Subject: [PATCH] handle allocation error. Found by Klockwork (www.klocwork.com) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8472 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_play_say.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index a74c7bcf86..a2c892d068 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -270,6 +270,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s status = SWITCH_STATUS_FALSE; cmd = switch_core_session_strdup(session, odata); + + if (!cmd) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Allocation error calling execute\n"); + break; + } + cmd_args = switch_separate_paren_args(cmd); if (!cmd_args ) {