mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
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>
This commit is contained in:
parent
2d825ed9eb
commit
223c2f121a
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue