fix memory leakage

Signed-off-by: shilei <shilei91@huawei.com>
Change-Id: Idb10c99229a18fccfc5b7d38f35f191c18f105e6
This commit is contained in:
shilei
2023-07-27 12:21:29 +00:00
parent 30bb2c01d3
commit f4b916dc2a
@@ -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;
}