bhyve: fix domain management

When domain is not persistent, it should be forgotten upon destroying.
This commit is contained in:
Wojciech Macek 2014-04-09 07:52:11 +02:00 committed by Roman Bogorodskiy
parent 86cfa1f603
commit 1ee866cf33
1 changed files with 7 additions and 1 deletions

View File

@ -753,7 +753,13 @@ bhyveDomainDestroy(virDomainPtr dom)
ret = virBhyveProcessStop(privconn, vm, VIR_DOMAIN_SHUTOFF_DESTROYED);
if (!vm->persistent) {
virDomainObjListRemove(privconn->domains, vm);
vm = NULL;
}
cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
}