[PATCH weston v2] clipboard: set fd member of clipboard_source

Pekka Paalanen ppaalanen at gmail.com
Fri Dec 12 05:08:39 PST 2014


On Wed, 10 Dec 2014 12:07:58 +0100
Marek Chalupa <mchqwerty at gmail.com> wrote:

> The fd member of clipboard_source structure was not set
> but was used in close().
> 
> v2. don't do unnecessary changes
> 
> Signed-off-by: Marek Chalupa <mchqwerty at gmail.com>
> ---
>  src/clipboard.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/clipboard.c b/src/clipboard.c
> index dbd8c9b..c1091a9 100644
> --- a/src/clipboard.c
> +++ b/src/clipboard.c
> @@ -151,6 +151,7 @@ clipboard_source_create(struct clipboard *clipboard,
>  	source->refcount = 1;
>  	source->clipboard = clipboard;
>  	source->serial = serial;
> +	source->fd = fd;
>  
>  	s = wl_array_add(&source->base.mime_types, sizeof *s);
>  	if (s == NULL)

Nice find. I suppose this would have been a problem only if a client
exited in the middle of a clipboard data transfer (read error), and so
it went unnoticed.

Pushed, thanks,
pq


More information about the wayland-devel mailing list