Re: [libvirt] [PATCH] Fix error handling in qemuMonitorOpen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 12, 2009 at 06:43:46AM +0900, Ryota Ozaki wrote:
> * 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"));

  Good catch ! Applied, thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]