mirror of
https://github.com/openharmony/bundlemanager_bundle_framework_lite.git
synced 2026-07-18 17:54:39 -04:00
fix prioblem
Signed-off-by: shilei <shilei91@huawei.com> Change-Id: Id508c2f291497f42283d472bf397d561d1bd821a
This commit is contained in:
@@ -602,9 +602,14 @@ static uint8_t ObtainBundleInfosOneByOne(BasicInfo basicInfo, int32_t len, uint8
|
||||
int32_t ret = bmsClient->Invoke(bmsClient, GET_BUNDLE_INFO_BY_INDEX, &innerIpcIo,
|
||||
&resultOfGetBundleInfo, Notify);
|
||||
if (ret != OHOS_SUCCESS) {
|
||||
HILOG_ERROR(HILOG_MODULE_APP, "BundleManager ObtainBundleInfosOneByOne invoke failed: %{public}d\n", ret);
|
||||
HILOG_ERROR(HILOG_MODULE_APP, "BundleManager ObtainBundleInfosOneByOne invoke failed: %{public}d", ret);
|
||||
return ERR_APPEXECFWK_INVOKE_ERROR;
|
||||
}
|
||||
if (resultOfGetBundleInfo.bundleInfo == nullptr) {
|
||||
HILOG_ERROR(HILOG_MODULE_APP, "BundleManager ObtainBundleInfosOneByOne failed: %{public}d",
|
||||
resultOfGetBundleInfo.resultCode);
|
||||
return resultOfGetBundleInfo.resultCode;
|
||||
}
|
||||
OHOS::BundleInfoUtils::CopyBundleInfo(basicInfo.flags, *bundleInfos + i, *(resultOfGetBundleInfo.bundleInfo));
|
||||
ClearBundleInfo(resultOfGetBundleInfo.bundleInfo);
|
||||
AdapterFree(resultOfGetBundleInfo.bundleInfo);
|
||||
@@ -661,7 +666,7 @@ static uint8_t ObtainBundleInfos(BasicInfo basicInfo, BundleInfo **bundleInfos,
|
||||
}
|
||||
*len = resultOfGetBundleInfos.length;
|
||||
OHOS::BundleInfoUtils::FreeBundleInfos(resultOfGetBundleInfos.bundleInfo, resultOfGetBundleInfos.length);
|
||||
return resultOfGetBundleInfos.resultCode;
|
||||
return res;
|
||||
}
|
||||
|
||||
uint8_t GetBundleInfos(const int flags, BundleInfo **bundleInfos, int32_t *len)
|
||||
|
||||
@@ -1009,6 +1009,7 @@ void GtManagerService::APP_QueryAppInfo(const char *appDir, AppInfoList *list)
|
||||
}
|
||||
char *fileName = reinterpret_cast<char *>(AdapterMalloc(MAX_NAME_LEN + 1));
|
||||
if (fileName == nullptr) {
|
||||
closedir(dir);
|
||||
return;
|
||||
}
|
||||
while ((ent = readdir(dir)) != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user