TSG-14379 Monitor策略日志多命中情况下Vsys ID填写错误

This commit is contained in:
fengweihao
2023-04-04 16:06:40 +08:00
parent 26b533cba9
commit ed9a4739a1
7 changed files with 40 additions and 26 deletions

View File

@@ -231,6 +231,10 @@ static char *cerate_device_id(const char *profile, const char *section, void *lo
}
device_id = tfe_strdup(item->valuestring);
if(tsg_sn_file)
{
FREE(&tsg_sn_file);
}
cJSON_Delete(json);
TFE_LOG_INFO(logger, "tfe device id : %s", device_id);
@@ -238,7 +242,13 @@ static char *cerate_device_id(const char *profile, const char *section, void *lo
finish:
TFE_LOG_INFO(logger, "tfe use default device id : %s", device_def_id);
if (json)
cJSON_Delete(json);
{
cJSON_Delete(json);
}
if(tsg_sn_file)
{
FREE(&tsg_sn_file);
}
return (char *)device_def_id;
}