diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d92947f7da..d6affb9721 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2345,8 +2345,10 @@ qemuCapsInitQMP(qemuCapsPtr caps, goto cleanup; } - if (!(mon = qemuMonitorOpen(NULL, &config, true, &callbacks))) + if (!(mon = qemuMonitorOpen(NULL, &config, true, &callbacks))) { + ret = 0; goto cleanup; + } qemuMonitorLock(mon);