!262 修复内存泄漏问题

Merge pull request !262 from shilei91/master
This commit is contained in:
openharmony_ci
2023-07-28 03:21:52 +00:00
committed by Gitee
@@ -550,13 +550,17 @@ bool GtBundleParser::ConvertIconResToBundleInfo(const char *resPath, uint32_t ic
AdapterFree(bundleInfo->smallIconPath);
if (isBigIconExisted) {
bundleInfo->bigIconPath = bigIconPath;
AdapterFree(bigIconPngPath);
} else {
bundleInfo->bigIconPath = bigIconPngPath;
AdapterFree(bigIconPath);
}
if (isSmallIconExisted) {
bundleInfo->smallIconPath = smallIconPath;
AdapterFree(smallIconPngPath);
} else {
bundleInfo->smallIconPath = smallIconPngPath;
AdapterFree(smallIconPath);
}
return true;
}