weston-editor: Close the data source after sending
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@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/clients/editor.c b/clients/editor.c
index b34ef42..6805d8a 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -576,6 +576,8 @@
if (write(fd, editor->selected_text, strlen(editor->selected_text) + 1) < 0)
fprintf(stderr, "write failed: %m\n");
+
+ close(fd);
}
static void