qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 5/6] qemu-ga: Plug fd leak on ga_channel_open()


From: mdroth
Subject: Re: [Qemu-devel] [PATCH 5/6] qemu-ga: Plug fd leak on ga_channel_open() error paths
Date: Fri, 11 Jan 2013 11:44:56 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jan 11, 2013 at 11:25:01AM +0100, Markus Armbruster wrote:
> Spotted by Coverity.
> 
> Signed-off-by: Markus Armbruster <address@hidden>

Reviewed-by: Michael Roth <address@hidden>

> ---
>  qga/channel-posix.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/qga/channel-posix.c b/qga/channel-posix.c
> index 5579185..b530808 100644
> --- a/qga/channel-posix.c
> +++ b/qga/channel-posix.c
> @@ -153,6 +153,7 @@ static gboolean ga_channel_open(GAChannel *c, const gchar 
> *path, GAChannelMethod
>          ret = ga_channel_client_add(c, fd);
>          if (ret) {
>              g_critical("error adding channel to main loop");
> +            close(fd);
>              return false;
>          }
>          break;
> -- 
> 1.7.11.7
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]