summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-07-07 10:52:17 -0500
committerJonas Ådahl <jadahl@gmail.com>2016-08-16 12:51:49 +0800
commit2af7e208cf4a50222bb7874fb8daf7623b997bda (patch)
treefb548b17ecd18dc7a85b4f7cefe3189c068cb8de
parente91b6e9c62847f4fa00be4f813da94ee050d0b94 (diff)
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>
-rw-r--r--clients/editor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clients/editor.c b/clients/editor.c
index b34ef429..6805d8a8 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -576,6 +576,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