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.`
This commit is contained in:
parent
85de9c25fe
commit
668fc0de0b
@ -135,7 +135,7 @@ data_source_send(struct weston_data_source *base,
|
|||||||
xcb_flush(wm->conn);
|
xcb_flush(wm->conn);
|
||||||
|
|
||||||
fcntl(fd, F_SETFL, O_WRONLY | O_NONBLOCK);
|
fcntl(fd, F_SETFL, O_WRONLY | O_NONBLOCK);
|
||||||
wm->data_source_fd = fcntl(fd, F_DUPFD_CLOEXEC, fd);
|
wm->data_source_fd = fd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user