提交 47c6981a authored 作者: William King's avatar William King

More explicit and defensive code so if the init fails we know we handling this…

More explicit and defensive code so if the init fails we know we handling this pointer safely, because  rc_config_init will free the pointer if there was a problem, but it will not set the pointer to NULL.
上级 6320042f
...@@ -55,6 +55,7 @@ switch_status_t mod_xml_radius_new_handle(rc_handle **new_handle, switch_xml_t x ...@@ -55,6 +55,7 @@ switch_status_t mod_xml_radius_new_handle(rc_handle **new_handle, switch_xml_t x
} }
if ( rc_config_init(*new_handle) == NULL ) { if ( rc_config_init(*new_handle) == NULL ) {
*new_handle = NULL;
goto err; goto err;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论