From: Roman Bogorodskiy Date: Sat, 11 Jul 2026 11:44:30 +0000 (+0200) Subject: bhyve: clear monitor reference on close X-Git-Tag: v12.6.0-rc1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b705444ee3d7ec0c8c8ba4ba61848e51fc31fdd;p=thirdparty%2Flibvirt.git bhyve: clear monitor reference on close Update virBhyveProcessStop() to set monitor to NULL after calling bhyveMonitorClose(). Signed-off-by: Roman Bogorodskiy Reviewed-by: Peter Krempa --- diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index d501aa8bcc..636d74afcc 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -673,7 +673,7 @@ virBhyveProcessStop(struct _bhyveConn *driver, /* Destroy monitor before running the actual destroy command to prevent * it from detecting VM shutdown and entering this cleanup routine again */ if ((priv != NULL) && (priv->mon != NULL)) - bhyveMonitorClose(priv->mon); + g_clear_pointer(&priv->mon, bhyveMonitorClose); cmd = virBhyveProcessBuildDestroyCmd(driver, vm->def); if (virCommandRun(cmd, NULL) < 0) {