[Freeswitch-svn] [commit] r8473 - freeswitch/trunk/src
Freeswitch SVN
mikej at freeswitch.org
Mon May 19 15:45:51 EDT 2008
Author: mikej
Date: Mon May 19 15:45:50 2008
New Revision: 8473
Modified:
freeswitch/trunk/src/switch_ivr_play_say.c
Log:
don't deref NULL. Found by Klockwork (www.klocwork.com)
Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c (original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c Mon May 19 15:45:50 2008
@@ -721,12 +721,11 @@
const char *lang = switch_channel_get_variable(channel, "language");
alt = file + 7;
dup = switch_core_session_strdup(session, alt);
-
- if ((arg = strchr(dup, ':'))) {
- *arg++ = '\0';
- }
if (dup) {
+ if ((arg = strchr(dup, ':'))) {
+ *arg++ = '\0';
+ }
return switch_ivr_phrase_macro(session, dup, arg, lang, args);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Args\n");
More information about the Freeswitch-svn
mailing list