mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
drm-shim: Avoid assertion fail if someone does close(-1).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23116>
This commit is contained in:
parent
b9dd13e1b3
commit
d261c425ff
1 changed files with 3 additions and 0 deletions
|
|
@ -147,6 +147,9 @@ static void handle_delete_fxn(struct hash_entry *entry)
|
|||
|
||||
void drm_shim_fd_unregister(int fd)
|
||||
{
|
||||
if (fd == -1)
|
||||
return;
|
||||
|
||||
struct hash_entry *entry =
|
||||
_mesa_hash_table_search(shim_device.fd_map, (void *)(uintptr_t)(fd + 1));
|
||||
if (!entry)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue