summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2026-01-30 09:02:56 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2026-01-30 09:02:56 +0100
commit4a81cfac9c5b279e7ccfb99ec84bc6ebbe0c7320 (patch)
tree829ee003c879bb6a21b324b89c5fb30e1d553e1f /src
parent4c5b1df4c8b9fb99c836209a0d74c331514bb939 (diff)
Wayland paste and DnD: fix minor issue revealed by valgrind - cont'd.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
index a2a5fdb52..3e45126b6 100644
--- a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
+++ b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
@@ -432,14 +432,12 @@ static void get_clipboard_or_dragged_text(struct wl_data_offer *offer) {
from = fl_selection_buffer[1];
while (rest > 0) {
ssize_t n = read(fds[0], from, rest);
- if (n <= 0) {
- close(fds[0]);
- break;
- }
+ if (n <= 0) break;
n = Fl_Screen_Driver::convert_crlf(from, n);
from += n;
rest -= n;
}
+ close(fds[0]);
fl_selection_length[1] = from - fl_selection_buffer[1];
fl_selection_buffer[1][fl_selection_length[1]] = 0;
way_out: