* src/qemu/qemu_monitor.c: add error check for qemuMonitorOpenXXX
---
src/qemu/qemu_monitor.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index dcd2dd7..2357734 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -474,6 +474,8 @@ qemuMonitorOpen(virDomainObjPtr vm,
goto cleanup;
}
+ if (mon->fd == -1) goto cleanup;
+
if (virSetCloseExec(mon->fd) < 0) {
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"%s", _("Unable to set monitor close-on-exec
flag"));
--
1.6.2.5