创建 pangu_log 时增加对函数返回值的判断,规避 wiredLB_init 初始化失败造成的 coredump
This commit is contained in:
@@ -68,6 +68,11 @@ struct pangu_logger* pangu_log_handle_create(const char* profile, const char* s
|
||||
}
|
||||
|
||||
log_file_upload_para=cache_evbase_parameter_new(profile, section, local_logger);
|
||||
if (log_file_upload_para == NULL)
|
||||
{
|
||||
TFE_LOG_ERROR(local_logger, "Pangu failed to new cache evbase parameter.");
|
||||
goto error_out;
|
||||
}
|
||||
instance->log_file_upload_instance=cache_evbase_instance_new(log_file_upload_para, local_logger);
|
||||
return instance;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user