Update virBhyveProcessStop() to set monitor to NULL after calling
bhyveMonitorClose().
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
---
src/bhyve/bhyve_process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.52.0