mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
parallels: don't forget to unlock domain after successful virDomainObjListFindByUUID call
Also a typo is fixed (s/detached/attached/) Signed-off-by: Maxim Nestratov mnestratov@parallels.com
This commit is contained in:
parent
e34cccf783
commit
0898d818ee
@ -1109,7 +1109,7 @@ static int parallelsDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
|
||||
privdom = virDomainObjListFindByUUID(privconn->domains, dom->uuid);
|
||||
if (privdom == NULL) {
|
||||
parallelsDomNotFoundError(dom);
|
||||
goto cleanup;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(flags & VIR_DOMAIN_AFFECT_CONFIG)) {
|
||||
@ -1148,13 +1148,14 @@ static int parallelsDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
|
||||
break;
|
||||
default:
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("device type '%s' cannot be detached"),
|
||||
_("device type '%s' cannot be attached"),
|
||||
virDomainDeviceTypeToString(dev->type));
|
||||
break;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
virObjectUnlock(privdom);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user