Merge pull request !2831 from 杨浩/fix
This commit is contained in:
openharmony_ci 2024-05-16 12:21:14 +00:00 committed by Gitee
commit 3aec004da3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 6 additions and 0 deletions

View File

@ -241,24 +241,28 @@ int FsDmCreateDevice(char **dmDevPath, const char *devName, DmVerityTarget *targ
rc = CreateDmDevice(fd, devName);
if (rc != 0) {
BEGET_LOGE("error 0x%x, create dm device fail", rc);
close(fd);
return rc;
}
rc = LoadDmDeviceTable(fd, devName, target);
if (rc != 0) {
BEGET_LOGE("error 0x%x, load device table fail", rc);
close(fd);
return rc;
}
rc = ActiveDmDevice(fd, devName);
if (rc != 0) {
BEGET_LOGE("error 0x%x, active device fail", rc);
close(fd);
return rc;
}
rc = GetDmDevPath(fd, dmDevPath, devName);
if (rc != 0) {
BEGET_LOGE("error 0x%x, get dm dev fail", rc);
close(fd);
return rc;
}

View File

@ -503,6 +503,7 @@ int FsHvbFinal(void)
{
if (g_vd != NULL) {
hvb_chain_verify_data_free(g_vd);
g_vd = NULL;
}
return 0;

View File

@ -307,6 +307,7 @@ static int CreateCtrlInfo(ServiceCtrlInfo **ctrlInfo, const char *cmd, uint32_t
(*ctrlInfo)->valueOffset = offset;
if (ret != 0 || len <= 0) {
free(*ctrlInfo);
*ctrlInfo = NULL;
return -1;
}
(*ctrlInfo)->ctrlParam = ctrlParam;