diff options
Diffstat (limited to 'common/src/tfe_resource.cpp')
| -rw-r--r-- | common/src/tfe_resource.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/common/src/tfe_resource.cpp b/common/src/tfe_resource.cpp index 489bac1..54c35a1 100644 --- a/common/src/tfe_resource.cpp +++ b/common/src/tfe_resource.cpp @@ -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; } |
