commit | 668fc0de0b57d0bc635ef63ad2d5ba0c03d7932d | [log] [tgz] |
---|---|---|
author | Kristian Høgsberg <krh@bitplanet.net> | Wed Sep 04 20:48:46 2013 -0700 |
committer | Kristian Høgsberg <krh@bitplanet.net> | Wed Sep 04 20:52:20 2013 -0700 |
tree | 68f92f2aa81f686fd287173538ef9d7af69569f4 | |
parent | 85de9c25fe16d8bab928295fd68851738ef23b24 [diff] [blame] |
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.`
diff --git a/src/xwayland/selection.c b/src/xwayland/selection.c index 735b726..d220569 100644 --- a/src/xwayland/selection.c +++ b/src/xwayland/selection.c
@@ -135,7 +135,7 @@ 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; } }