mirror of
https://github.com/openharmony/bundlemanager_bundle_framework_lite.git
synced 2026-07-18 17:54:39 -04:00
fix memory leakage
Signed-off-by: shilei <shilei91@huawei.com> Change-Id: Idb10c99229a18fccfc5b7d38f35f191c18f105e6
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user