On Fri, Nov 15, 2013 at 02:17:56PM +0100, Lubomir Rintel wrote:
> It would be possible to make the compositor leak file descriptors by
> passing descriptors of open unmmapable files to it, such as /dev/null.
> 
> Signed-off-by: Lubomir Rintel <lkund...@v3.sk>
> ---
>  src/wayland-shm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/wayland-shm.c b/src/wayland-shm.c
> index ad92dba..0bae6da 100644
> --- a/src/wayland-shm.c
> +++ b/src/wayland-shm.c
> @@ -248,7 +248,7 @@ shm_create_pool(struct wl_client *client, struct 
> wl_resource *resource,
>               wl_resource_post_error(resource,
>                                      WL_SHM_ERROR_INVALID_FD,
>                                      "failed mmap fd %d", fd);
> -             goto err_free;
> +             goto err_close;

Good find, fix applied.

Kristian

>       }
>       close(fd);
>  
> -- 
> 1.8.4.2
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to