mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
parallels: don't forget to unlock domain if unregister fails
Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
This commit is contained in:
parent
7bf69e0208
commit
2765fb72bd
@ -948,6 +948,7 @@ parallelsDomainUndefineFlags(virDomainPtr domain,
|
||||
{
|
||||
parallelsConnPtr privconn = domain->conn->privateData;
|
||||
virDomainObjPtr dom = NULL;
|
||||
int ret;
|
||||
|
||||
virCheckFlags(0, -1);
|
||||
|
||||
@ -957,7 +958,11 @@ parallelsDomainUndefineFlags(virDomainPtr domain,
|
||||
return -1;
|
||||
}
|
||||
|
||||
return prlsdkUnregisterDomain(privconn, dom);
|
||||
ret = prlsdkUnregisterDomain(privconn, dom);
|
||||
if (ret)
|
||||
virObjectUnlock(dom);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user