From: Michael Jerris Date: Mon, 19 May 2008 18:53:32 +0000 (+0000) Subject: handle allocation error. Found by Klockwork (www.klocwork.com) X-Git-Tag: v1.0-rc6~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21b5d73ad06cf4cdd3c44c6527de80c91bbfe77f;p=thirdparty%2Ffreeswitch.git 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 --- 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); }