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 <der...@osg.samsung.com>
---
 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to