bhyve: clean up event thread

Currently, eventThread cleanup is missing. Fix that by calling
virBhyveDomainObjStopWorker() in virBhyveProcessStop()
and un-referring the eventThread in bhyveDomainObjPrivateFree().

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Roman Bogorodskiy committed 2026-07-27 17:52:59 +02:00
1 parent fefe5fa8f0
commit 0041788857
2 files changed
+7

No files matched your search

+5
View File
@@ -54,6 +54,11 @@ bhyveDomainObjPrivateFree(void *data)
virDomainPCIAddressSetFree(priv->pciaddrs);
if (priv->eventThread) {
VIR_ERROR(_("Unexpected event thread still active during domain deletion"));
g_object_unref(priv->eventThread);
}
g_free(priv);
}
+2
View File
@@ -675,6 +675,8 @@ virBhyveProcessStop(struct _bhyveConn *driver,
if ((priv != NULL) && (priv->mon != NULL))
g_clear_pointer(&priv->mon, bhyveMonitorClose);
virBhyveDomainObjStopWorker(vm);
cmd = virBhyveProcessBuildDestroyCmd(driver, vm->def);
if (virCommandRun(cmd, NULL) < 0) {
/* Only failure of the actual destroy command warrants unsuccessful return code,