ch_driver: fix condition in virCHDomainRemoveInactive()

Rectify the condition to remove a domain only if it is not persistent.

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Purna Pavan Chandra Aekkaladevi 2024-01-29 12:38:21 +00:00 committed by Michal Privoznik
parent 19dc73d16e
commit 18f2bf0a43

View File

@ -36,7 +36,7 @@ void
virCHDomainRemoveInactive(virCHDriver *driver, virCHDomainRemoveInactive(virCHDriver *driver,
virDomainObj *vm) virDomainObj *vm)
{ {
if (vm->persistent) { if (!vm->persistent) {
virDomainObjListRemove(driver->domains, vm); virDomainObjListRemove(driver->domains, vm);
} }
} }