diff --git a/utils/src/b_jsonutil/b_jsonutil.cpp b/utils/src/b_jsonutil/b_jsonutil.cpp index 20a2166fc8559e44424e5b3a07a8105c87adedce..cf05d7fe1c06fa201fa4296f9a43242c78b6a01d 100644 --- a/utils/src/b_jsonutil/b_jsonutil.cpp +++ b/utils/src/b_jsonutil/b_jsonutil.cpp @@ -167,13 +167,11 @@ bool BJsonUtil::HasUnicastInfo(std::string &bundleInfo) cJSON *infoItem = cJSON_GetArrayItem(infos, i); if (!cJSON_IsObject(infoItem)) { HILOGE("Parse json error, info item is not an object"); - cJSON_Delete(root); continue; } cJSON *type = cJSON_GetObjectItem(infoItem, "type"); if (type == nullptr || !cJSON_IsString(type) || (type->valuestring == nullptr)) { HILOGE("Parse json type element error"); - cJSON_Delete(root); continue; } if (string(type->valuestring).compare(BConstants::UNICAST_TYPE) == 0) {