Merge pull request !932 from zhouoaoteng/master
This commit is contained in:
openharmony_ci 2024-09-24 04:15:31 +00:00 committed by Gitee
commit c2785f1c5c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 6 additions and 0 deletions

View File

@ -219,6 +219,7 @@ std::pair<std::shared_ptr<FileAccessHelper>, int> FileAccessHelper::DoCreatorHel
connectInfo->want = wants[i];
connectInfo->fileAccessExtConnection = fileAccessExtConnection;
std::string bundleName = wants[i].GetElement().GetBundleName();
HILOG_INFO("DoCreatorHelper bundleName is %{public}s", bundleName.c_str());
cMap.insert(std::pair<std::string, std::shared_ptr<ConnectInfo>>(bundleName, connectInfo));
}
@ -341,6 +342,7 @@ sptr<IFileAccessExtBase> FileAccessHelper::GetProxyByUri(Uri &uri)
sptr<IFileAccessExtBase> FileAccessHelper::GetProxyByBundleName(const std::string &bundleName)
{
auto connectInfo = GetConnectInfo(bundleName);
HILOG_INFO("GetProxyByBundleName start %{public}s", bundleName.c_str());
if (connectInfo == nullptr) {
HILOG_ERROR("GetProxyByUri failed with invalid connectInfo");
return nullptr;

View File

@ -164,6 +164,8 @@ static void Deleter(struct NameListArg *arg)
(arg->namelist)[i] = nullptr;
}
free(arg->namelist);
free(arg);
arg = nullptr;
}
static int64_t GetFileMtime(const string &fileName)

View File

@ -57,6 +57,8 @@ static void Deleter(struct NameListArg *arg)
(arg->namelist)[i] = nullptr;
}
free(arg->namelist);
free(arg);
arg = nullptr;
}
static int32_t FilterFunc(const struct dirent *filename)