fix segfault on incorrect usage of originate api command (jira MODAPP-2)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4378 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-02-23 21:00:20 +00:00
parent 9f4ff8814b
commit 875f87ab54
1 changed files with 2 additions and 2 deletions

View File

@ -522,10 +522,10 @@ static switch_status_t originate_function(char *cmd, switch_core_session_t *ises
assert(caller_channel != NULL);
switch_channel_clear_state_handler(caller_channel, NULL);
if (*exten == '&') {
if (*exten == '&' && *(exten + 1)) {
switch_caller_extension_t *extension = NULL;
char *app_name = switch_core_session_strdup(caller_session, (exten + 1));
char *arg, *e;
char *arg = NULL, *e;
if ((e = strchr(app_name, ')'))) {
*e = '\0';