
Roman Bogorodskiy wrote:
Wojciech Macek wrote:
When domain is not persistent, it should be forgotten upon destroying. --- src/bhyve/bhyve_driver.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 7187202..23e7112 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -753,8 +753,14 @@ bhyveDomainDestroy(virDomainPtr dom)
ret = virBhyveProcessStop(privconn, vm, VIR_DOMAIN_SHUTOFF_DESTROYED);
- cleanup: - virObjectUnlock(vm); + if (!vm->persistent) { + virDomainObjListRemove(privconn->domains, vm); + vm = NULL; + } + +cleanup: + if (vm) + virObjectUnlock(vm); return ret; }
ACK, I'm going to push that tomorrow if there'll be no other notes.
Squashed in a label formatting style fix (now labels should have one space offset) and pushed, thanks! Roman Bogorodskiy