mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 18:50:30 +01:00
vulkan/wsi/x11: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork(). Signed-off-by: Simon Ser <contact@emersion.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
This commit is contained in:
parent
e4ff98bacb
commit
26d90674c2
1 changed files with 1 additions and 1 deletions
|
|
@ -2170,7 +2170,7 @@ x11_image_init(VkDevice device_h, struct x11_swapchain *chain,
|
|||
if (chain->base.image_info.explicit_sync) {
|
||||
for (uint32_t i = 0; i < WSI_ES_COUNT; i++) {
|
||||
image->dri3_syncobj[i] = xcb_generate_id(chain->conn);
|
||||
int fd = dup(image->base.explicit_sync[i].fd);
|
||||
int fd = os_dupfd_cloexec(image->base.explicit_sync[i].fd);
|
||||
if (fd < 0)
|
||||
goto fail_image;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue