[Freeswitch-svn] [commit] r8484 - freeswitch/trunk/src/mod/applications/mod_dptools

Freeswitch SVN mikej at freeswitch.org
Mon May 19 18:36:25 EDT 2008


Author: mikej
Date: Mon May 19 18:36:25 2008
New Revision: 8484

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c

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

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Mon May 19 18:36:25 2008
@@ -1687,7 +1687,10 @@
 	}
 
 	path = switch_core_session_strdup(session, data);
-	if (path && (p = strchr(path, '+'))) {
+
+	if (!path) return;
+
+	if ((p = strchr(path, '+'))) {
 		char *q = p - 1;
 		while(q && *q == ' ') {
 			*q = '\0';



More information about the Freeswitch-svn mailing list