Mesa (main): gallium/vl: don't leak fd in vl_dri3_screen_create
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 28 13:24:03 UTC 2021
Module: Mesa
Branch: main
Commit: b88fd3ccc0deeb3776ed4fd0c72b4ab649e1a208
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b88fd3ccc0deeb3776ed4fd0c72b4ab649e1a208
Author: Zhu Yuliang <zhuyuliang at uniontech.com>
Date: Wed Jul 28 11:27:27 2021 +0800
gallium/vl: don't leak fd in vl_dri3_screen_create
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12092>
---
src/gallium/auxiliary/vl/vl_winsys_dri3.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri3.c b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
index f7cd4c1f1a4..baa12fa95d0 100644
--- a/src/gallium/auxiliary/vl/vl_winsys_dri3.c
+++ b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
@@ -852,6 +852,9 @@ vl_dri3_screen_create(Display *display, int screen)
scrn->base.set_back_texture_from_output = vl_dri3_screen_set_back_texture_from_output;
scrn->next_back = 1;
+
+ close(fd);
+
return &scrn->base;
no_context:
More information about the mesa-commit
mailing list