]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
handle allocation error. Found by Klockwork (www.klocwork.com)
authorMichael Jerris <mike@jerris.com>
Mon, 19 May 2008 18:53:32 +0000 (18:53 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 19 May 2008 18:53:32 +0000 (18:53 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8469 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_async.c

index bc96084e8b8700709401044401d200f752dceb37..fb545bbf4458a05f976e529db36bacecdc355190 100644 (file)
@@ -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);
        }