1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 06:50:22 +03:00

qemuDomainGetLaunchSecurityInfo: Don't forget unlock VM object on (impossible) error

If 'vm->def->sec->sectype' would be invalid; which is currently not
possible; we'd not unlock the domain object. Fix the logic even when the
bug currently can't happen.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2025-02-26 16:55:54 +01:00
parent defca11627
commit 20e0bc3fbd

View File

@ -19152,7 +19152,7 @@ qemuDomainGetLaunchSecurityInfo(virDomainPtr domain,
case VIR_DOMAIN_LAUNCH_SECURITY_NONE:
case VIR_DOMAIN_LAUNCH_SECURITY_LAST:
virReportEnumRangeError(virDomainLaunchSecurity, vm->def->sec->sectype);
return -1;
goto cleanup;
}
ret = 0;