From ba11795af5d020e824ec5573317c896354775f3f Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 19 May 2008 22:36:25 +0000 Subject: [PATCH] handle allocation error. Found by Klockwork (www.klocwork.com) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8484 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_dptools/mod_dptools.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index e46d10a62b..bc1579f235 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -1687,7 +1687,10 @@ SWITCH_STANDARD_APP(record_session_function) } 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';