Mesa (staging/21.2): gallium/vl: don't leak fd in vl_dri3_screen_create
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 28 23:00:07 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 5577fb807e8e419101b62e08e5de2b5f3f91adb9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5577fb807e8e419101b62e08e5de2b5f3f91adb9
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>
(cherry picked from commit b88fd3ccc0deeb3776ed4fd0c72b4ab649e1a208)
---
.pick_status.json | 2 +-
src/gallium/auxiliary/vl/vl_winsys_dri3.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index f89a1a8fd14..686e7ac0b33 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -229,7 +229,7 @@
"description": "gallium/vl: don't leak fd in vl_dri3_screen_create",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
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