Re: [PATCH] udscs: Avoid file descriptor leak

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

 



Hi,

On Thu, Nov 15, 2018 at 10:06:57PM +0000, Frediano Ziglio wrote:
> If connection fails the socket descriptor is not closed causing
> a leak.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>

Acked-by: Victor Toso <victortoso@xxxxxxxxxx>

> ---
>  src/udscs.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/udscs.c b/src/udscs.c
> index 62abc97..7fe74b9 100644
> --- a/src/udscs.c
> +++ b/src/udscs.c
> @@ -119,6 +119,7 @@ struct udscs_connection *udscs_connect(const char *socketname,
>          if (conn->debug) {
>              syslog(LOG_DEBUG, "connect %s: %m", socketname);
>          }
> +        close(conn->fd);
>          g_free(conn);
>          return NULL;
>      }
> -- 
> 2.17.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]