diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1ecb243b8a..ab030fe4f6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4467,8 +4467,8 @@ processSerialChangedEvent(virQEMUDriverPtr driver, if (priv->agent) { qemuAgentClose(priv->agent); priv->agent = NULL; - priv->agentError = false; } + priv->agentError = false; } event = virDomainEventAgentLifecycleNewFromObj(vm, newstate, diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d3a2cbd92a..cb9eb22982 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -151,6 +151,7 @@ qemuProcessHandleAgentEOF(qemuAgentPtr agent, qemuAgentClose(agent); priv->agent = NULL; + priv->agentError = false; virObjectUnlock(vm); return; @@ -5995,8 +5996,8 @@ void qemuProcessStop(virQEMUDriverPtr driver, if (priv->agent) { qemuAgentClose(priv->agent); priv->agent = NULL; - priv->agentError = false; } + priv->agentError = false; if (priv->mon) { qemuMonitorClose(priv->mon);