diff --git a/utils/loc_cfg.cpp b/utils/loc_cfg.cpp index fd38c8a9..884bb10d 100644 --- a/utils/loc_cfg.cpp +++ b/utils/loc_cfg.cpp @@ -1119,7 +1119,9 @@ int loc_read_process_conf(const char* conf_file_name, uint32_t * process_count_p } err: - fclose(conf_fp); + if (conf_fp) { + fclose(conf_fp); + } if (ret != 0) { LOC_LOGE("%s:%d]: ret: %d", __func__, __LINE__, ret); if (child_proc) {