[PATCH weston] weston-editor: Close the data source after sending
Jonas Ã…dahl
jadahl at gmail.com
Tue Aug 16 04:53:41 UTC 2016
On Sat, Jul 09, 2016 at 12:08:53PM -0700, Yong Bakos wrote:
> On Jul 7, 2016, at 8:52 AM, Derek Foreman <derekf at osg.samsung.com> wrote:
> >
> > We're leaking the fd when sending cut'n'paste. Failure to close can also
> > makes the other end unhappy because it doesn't know the paste is finished.
> >
> > Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
>
> Occurrences in other weston clients already mimc this patch in a similar
> fashion, so this is
>
> Reviewed-by: Yong Bakos <ybakos at humanoriented.com>
Pushed:
e91b6e9..2af7e20 master -> master
Jonas
>
> Regards,
> yong
>
>
> > ---
> > clients/editor.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/clients/editor.c b/clients/editor.c
> > index e081a5b..9daa77f 100644
> > --- a/clients/editor.c
> > +++ b/clients/editor.c
> > @@ -575,6 +575,8 @@ data_source_send(void *data,
> >
> > if (write(fd, editor->selected_text, strlen(editor->selected_text) + 1) < 0)
> > fprintf(stderr, "write failed: %m\n");
> > +
> > + close(fd);
> > }
> >
> > static void
> > --
> > 2.8.1
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list