From 21b5d73ad06cf4cdd3c44c6527de80c91bbfe77f Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 19 May 2008 18:53:32 +0000 Subject: [PATCH] handle allocation error. Found by Klockwork (www.klocwork.com) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8469 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_async.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index bc96084e8b..fb545bbf44 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -1848,6 +1848,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_broadcast(const char *uuid, const cha mypath = strdup(path); + if (!mypath) { + switch_core_session_rwunlock(session); + return SWITCH_STATUS_MEMERR; + } + if ((nomedia = switch_channel_test_flag(channel, CF_PROXY_MODE))) { switch_ivr_media(uuid, SMF_REBRIDGE); }