mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 08:08:05 +02:00
freedreno: also remove from name table on bo delete
When adding the name tracking, I missed removing from the name table when the bo was deleted, leaving a dangling pointer. Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
acfbf394a9
commit
3586337f37
1 changed files with 2 additions and 0 deletions
|
|
@ -247,6 +247,8 @@ void fd_bo_del(struct fd_bo *bo)
|
|||
};
|
||||
pthread_mutex_lock(&table_lock);
|
||||
drmHashDelete(bo->dev->handle_table, bo->handle);
|
||||
if (bo->name)
|
||||
drmHashDelete(bo->dev->name_table, bo->name);
|
||||
drmIoctl(bo->dev->fd, DRM_IOCTL_GEM_CLOSE, &req);
|
||||
pthread_mutex_unlock(&table_lock);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue