diff --git a/src/switch_caller.c b/src/switch_caller.c index 4b19170dee..69dea8d66f 100644 --- a/src/switch_caller.c +++ b/src/switch_caller.c @@ -50,9 +50,8 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor switch_caller_profile_t *profile = NULL; profile = switch_core_alloc(pool, sizeof(*profile)); + switch_assert(profile != NULL); memset(profile, 0, sizeof(*profile)); - - switch_assert(profile != NULL); if (!context) { context = "default"; diff --git a/src/switch_core_session.c b/src/switch_core_session.c index a92e48b147..a924966e26 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -1524,9 +1524,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_exten(switch_core_se new_profile->context = switch_core_strdup(new_profile->pool, context); } - dpstr = switch_core_session_strdup(session, new_profile->dialplan); - - + dpstr = switch_core_session_strdup(session, new_profile->dialplan); switch_channel_set_hunt_caller_profile(channel, new_profile); argc = switch_separate_string(dpstr, ',', dp, (sizeof(dp) / sizeof(dp[0])));