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>
main
Rob Clark 2013-05-17 16:13:02 -04:00
parent acfbf394a9
commit 3586337f37
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}