mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
bhyve: fix domain management
When domain is not persistent, it should be forgotten upon destroying.
This commit is contained in:
parent
86cfa1f603
commit
1ee866cf33
@ -753,8 +753,14 @@ bhyveDomainDestroy(virDomainPtr dom)
|
||||
|
||||
ret = virBhyveProcessStop(privconn, vm, VIR_DOMAIN_SHUTOFF_DESTROYED);
|
||||
|
||||
if (!vm->persistent) {
|
||||
virDomainObjListRemove(privconn->domains, vm);
|
||||
vm = NULL;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
virObjectUnlock(vm);
|
||||
if (vm)
|
||||
virObjectUnlock(vm);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user