[PATCH weston] weston-editor: Close the data source after sending
Derek Foreman
derekf at osg.samsung.com
Thu Jul 7 15:52:17 UTC 2016
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>
---
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
More information about the wayland-devel
mailing list