summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2013-05-17 16:13:02 -0400
committerRob Clark <robclark@freedesktop.org>2013-05-17 16:13:02 -0400
commit3586337f3703ce4833a375f66b08df064a1cec28 (patch)
treee7551e300c411563a4af7beee3e24383d9359b75
parentacfbf394a9176ea97f114ca6c0eb8249a2220e82 (diff)
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>
-rw-r--r--freedreno/freedreno_bo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index f52ce5ea..8f78432b 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -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);
}