mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
Fix error handling in qemuMonitorOpen
* src/qemu/qemu_monitor.c: add error check for qemuMonitorOpenXXX returned file descriptor
This commit is contained in:
parent
bc0010b3d1
commit
45e0483dac
@ -474,6 +474,8 @@ qemuMonitorOpen(virDomainObjPtr vm,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mon->fd == -1) goto cleanup;
|
||||||
|
|
||||||
if (virSetCloseExec(mon->fd) < 0) {
|
if (virSetCloseExec(mon->fd) < 0) {
|
||||||
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s", _("Unable to set monitor close-on-exec flag"));
|
"%s", _("Unable to set monitor close-on-exec flag"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user