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>
virDomainPCIAddressSetFree(priv->pciaddrs);
+ if (priv->eventThread) {
+ VIR_ERROR(_("Unexpected event thread still active during domain deletion"));
+ g_object_unref(priv->eventThread);
+ }
+
g_free(priv);
}
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,