[Freeswitch-svn] [commit] r8469 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Mon May 19 14:53:32 EDT 2008


Author: mikej
Date: Mon May 19 14:53:32 2008
New Revision: 8469

Modified:
   freeswitch/trunk/src/switch_ivr_async.c

Log:
handle allocation error. Found by Klockwork (www.klocwork.com)

Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c	(original)
+++ freeswitch/trunk/src/switch_ivr_async.c	Mon May 19 14:53:32 2008
@@ -1848,6 +1848,11 @@
 
 	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);
 	}



More information about the Freeswitch-svn mailing list