提交 e573c86d authored 作者: Chris Parker's avatar Chris Parker

Fix potential seg_fault reported in MODEVENT-35

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10869 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 8b852956
...@@ -554,7 +554,8 @@ static switch_status_t my_on_hangup(switch_core_session_t *session) ...@@ -554,7 +554,8 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
goto end; goto end;
} }
} }
if (profile->caller_extension && profile->caller_extension->last_application->application_name) { if (profile->caller_extension && profile->caller_extension->last_application &&
profile->caller_extension->last_application->application_name) {
if (rc_avpair_add(rad_config, &send, PW_FS_LASTAPP, if (rc_avpair_add(rad_config, &send, PW_FS_LASTAPP,
(void *) profile->caller_extension->last_application->application_name, -1, PW_FS_PEC) == NULL) { (void *) profile->caller_extension->last_application->application_name, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "failed adding Freeswitch-Lastapp: %s\n", profile->source); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "failed adding Freeswitch-Lastapp: %s\n", profile->source);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论