don't deref NULL. Found by Klockwork (www.klocwork.com)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8473 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
a68e10c896
commit
cc5074183b
|
@ -721,12 +721,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
|
||||||
const char *lang = switch_channel_get_variable(channel, "language");
|
const char *lang = switch_channel_get_variable(channel, "language");
|
||||||
alt = file + 7;
|
alt = file + 7;
|
||||||
dup = switch_core_session_strdup(session, alt);
|
dup = switch_core_session_strdup(session, alt);
|
||||||
|
|
||||||
if ((arg = strchr(dup, ':'))) {
|
|
||||||
*arg++ = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dup) {
|
if (dup) {
|
||||||
|
if ((arg = strchr(dup, ':'))) {
|
||||||
|
*arg++ = '\0';
|
||||||
|
}
|
||||||
return switch_ivr_phrase_macro(session, dup, arg, lang, args);
|
return switch_ivr_phrase_macro(session, dup, arg, lang, args);
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Args\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Args\n");
|
||||||
|
|
Loading…
Reference in New Issue