From f6df7dfd8b4b01838121c747a7a262129f9153a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 6 Jul 2026 11:09:39 +0200 Subject: [PATCH] vo/vulkan/context_display: init fd to -1 Instead of using zero initialized value. Otherwise an early init failure calls close(0), a descriptor we don't own, breaking whatever else happens to hold it. This is bit defensive, but I want to init those just after allocation, so we don't have to trace whether they are initalized correctly or not. --- video/out/vulkan/context_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/video/out/vulkan/context_display.c b/video/out/vulkan/context_display.c index 1d792670ee..70f870a82e 100644 --- a/video/out/vulkan/context_display.c +++ b/video/out/vulkan/context_display.c @@ -377,6 +377,10 @@ static bool display_init(struct ra_ctx *ctx) VkDisplayModePropertiesKHR *mode = NULL; +#if HAVE_DRM + p->drm_params.fd = -1; + p->drm_params.render_fd = -1; +#endif p->opts = mp_get_config_group(p, ctx->global, &vulkan_display_conf); int display_idx = p->opts->display; int mode_idx = p->opts->mode;