xwm: Fix fd leak in selection code

The file descriptors we receive in the wayland protocol callbacks are
already O_CLOEXEC, so don't dup them to set O_CLOEXEC.`
dev
Kristian Høgsberg 11 years ago
parent 85de9c25fe
commit 668fc0de0b
  1. 2
      src/xwayland/selection.c

@ -135,7 +135,7 @@ data_source_send(struct weston_data_source *base,
xcb_flush(wm->conn);
fcntl(fd, F_SETFL, O_WRONLY | O_NONBLOCK);
wm->data_source_fd = fcntl(fd, F_DUPFD_CLOEXEC, fd);
wm->data_source_fd = fd;
}
}

Loading…
Cancel
Save