mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-29 23:40:45 +02:00
iris: handle os_dupfd_cloexec failure
Found by Coverity. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6126>
This commit is contained in:
parent
612ef74190
commit
0685815ea6
1 changed files with 4 additions and 1 deletions
|
|
@ -32,5 +32,8 @@ extern struct pipe_screen *iris_screen_create(int fd, const struct pipe_screen_c
|
|||
struct pipe_screen *
|
||||
iris_drm_screen_create(int fd, const struct pipe_screen_config *config)
|
||||
{
|
||||
return iris_screen_create(os_dupfd_cloexec(fd), config);
|
||||
int newfd = os_dupfd_cloexec(fd);
|
||||
if (newfd < 0)
|
||||
return NULL;
|
||||
return iris_screen_create(newfd, config);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue