minor changes

This commit is contained in:
Shengliang Guan 2021-10-17 22:33:23 +08:00
parent 80a7549cba
commit 6a24d82be7
1 changed files with 3 additions and 3 deletions

View File

@ -152,9 +152,9 @@ static int32_t sdbReadDataFile() {
code = 0;
PARSE_SDB_DATA_ERROR:
tfree(line);
fclose(fp);
cJSON_Delete(root);
if (line) free(line);
if (fp) fclose(fp);
if (root) cJSON_Delete(root);
return code;
}