From 7bf2d9cee615408efeac288f59deb525193dc137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 6 Jul 2026 11:14:32 +0200 Subject: [PATCH] vo/opengl/context_drm_egl: 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/opengl/context_drm_egl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c index bf1866652e..017a713707 100644 --- a/video/out/opengl/context_drm_egl.c +++ b/video/out/opengl/context_drm_egl.c @@ -562,6 +562,8 @@ static bool drm_egl_init(struct ra_ctx *ctx) goto err; struct priv *p = ctx->priv = talloc_zero(ctx, struct priv); + p->drm_params.fd = -1; + p->drm_params.render_fd = -1; struct vo_drm_state *drm = ctx->vo->drm; if (ctx->vo->drm->opts->draw_surface_size.wh_valid) {