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,8 +753,14 @@ bhyveDomainDestroy(virDomainPtr dom)
ret = virBhyveProcessStop(privconn, vm, VIR_DOMAIN_SHUTOFF_DESTROYED); ret = virBhyveProcessStop(privconn, vm, VIR_DOMAIN_SHUTOFF_DESTROYED);
if (!vm->persistent) {
virDomainObjListRemove(privconn->domains, vm);
vm = NULL;
}
cleanup: cleanup:
virObjectUnlock(vm); if (vm)
virObjectUnlock(vm);
return ret; return ret;
} }