From 2af7e208cf4a50222bb7874fb8daf7623b997bda Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 7 Jul 2016 10:52:17 -0500 Subject: [PATCH] weston-editor: Close the data source after sending MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Yong Bakos Reviewed-by: Jonas Ã…dahl --- clients/editor.c | 2 ++ 1 file changed, 2 insertions(+) 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