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:
@@ -147,6 +147,9 @@ static void handle_delete_fxn(struct hash_entry *entry)
|
|||||||
|
|
||||||
void drm_shim_fd_unregister(int fd)
|
void drm_shim_fd_unregister(int fd)
|
||||||
{
|
{
|
||||||
|
if (fd == -1)
|
||||||
|
return;
|
||||||
|
|
||||||
struct hash_entry *entry =
|
struct hash_entry *entry =
|
||||||
_mesa_hash_table_search(shim_device.fd_map, (void *)(uintptr_t)(fd + 1));
|
_mesa_hash_table_search(shim_device.fd_map, (void *)(uintptr_t)(fd + 1));
|
||||||
if (!entry)
|
if (!entry)
|
||||||
|
Reference in New Issue
Block a user