gallium/vl: don't leak fd in vl_dri3_screen_create

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12092>
(cherry picked from commit b88fd3ccc0)
This commit is contained in:
Zhu Yuliang 2021-07-28 11:27:27 +08:00 committed by Eric Engestrom
parent 85f9761653
commit 755f2c5ca9
2 changed files with 4 additions and 1 deletions

View file

@ -2029,7 +2029,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
},

View file

@ -847,6 +847,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: