mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
bhyve: fix domain management
When domain is not persistent, it should be forgotten upon destroying.
This commit is contained in:
1 parent
86cfa1f603
commit
1ee866cf33
1 file changed
+7
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user