diff options
| author | luwenpeng <[email protected]> | 2020-11-17 13:26:22 +0600 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2020-11-17 13:26:22 +0600 |
| commit | 1c31974b61069b22477bd227fae7ab23fb206687 (patch) | |
| tree | 4fa1e5068637c246c11254c18818d4418e48f337 | |
| parent | 012f4f66023ba7b794508e10faceec74056ba952 (diff) | |
创建 pangu_log 时增加对函数返回值的判断,规避 wiredLB_init 初始化失败造成的 coredumpv4.3.22-202011
| -rw-r--r-- | plugin/business/pangu-http/src/pangu_logger.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugin/business/pangu-http/src/pangu_logger.cpp b/plugin/business/pangu-http/src/pangu_logger.cpp index 6a5269d..86efcab 100644 --- a/plugin/business/pangu-http/src/pangu_logger.cpp +++ b/plugin/business/pangu-http/src/pangu_logger.cpp @@ -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; |
