mirror of
https://github.com/openharmony/bundlemanager_bundle_framework_lite.git
synced 2026-07-18 17:54:39 -04:00
fix memory leak bug
This commit is contained in:
@@ -954,6 +954,9 @@ void GtManagerService::TransformJsToBcWhenRestart(const char *codePath, const ch
|
||||
|
||||
cJSON *oldJsEngineVerObj = cJSON_GetObjectItem(installRecordJson, JSON_SUB_KEY_JSENGINE_VERSION);
|
||||
if (oldJsEngineVerObj == nullptr) {
|
||||
cJSON_Delete(jsEngineVerObj);
|
||||
cJSON_Delete(installRecordJson);
|
||||
AdapterFree(bundleJsonPath);
|
||||
return;
|
||||
}
|
||||
if (cJSON_IsString(oldJsEngineVerObj) && strcmp(oldJsEngineVerObj->valuestring, jsEngineVer_) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user