From cb7d110a2c998ca56d1d86af67c8edd66fe264bd Mon Sep 17 00:00:00 2001 From: SurName <472256532@qq.com> Date: Wed, 5 Feb 2025 15:01:55 +0800 Subject: [PATCH] repair code warning Signed-off-by: xujunyang --- services/timer/src/cjson_helper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/timer/src/cjson_helper.cpp b/services/timer/src/cjson_helper.cpp index 75412594..b33f045a 100644 --- a/services/timer/src/cjson_helper.cpp +++ b/services/timer/src/cjson_helper.cpp @@ -107,10 +107,12 @@ cJSON* CjsonHelper::QueryTable(std::string tableName, cJSON* db) cJSON* table = cJSON_GetObjectItem(db, tableName.c_str()); if (table == NULL) { TIME_HILOGE(TIME_MODULE_SERVICE, "%{public}s get fail!", tableName.c_str()); + cJSON_Delete(db); return data; } data = table; + cJSON_Delete(db); return data; } -- Gitee