提交 7421bcfb authored 作者: Kapil's avatar Kapil

adding safe check for term ptr

上级 4423077a
...@@ -85,7 +85,7 @@ switch_status_t mg_stack_termination_is_in_service(megaco_profile_t* mg_profile, ...@@ -85,7 +85,7 @@ switch_status_t mg_stack_termination_is_in_service(megaco_profile_t* mg_profile,
{ {
mg_termination_t* term = NULL; mg_termination_t* term = NULL;
term = megaco_find_termination(mg_profile, term_str); term = megaco_find_termination(mg_profile, term_str);
if(switch_test_flag(term, MG_IN_SERVICE)){ if(term && switch_test_flag(term, MG_IN_SERVICE)){
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} else { } else {
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论