Mesa (master): vc4: Fix memory leak from simple_list conversion.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Jun 18 06:55:06 UTC 2015
Module: Mesa
Branch: master
Commit: dc1fbad2eb5454ed36a066d2a69b575cd5a8abaf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc1fbad2eb5454ed36a066d2a69b575cd5a8abaf
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jun 17 23:49:19 2015 -0700
vc4: Fix memory leak from simple_list conversion.
I accidentally shadowed the outside declaration, so we always returned
NULL even when we'd found something in the cache.
---
src/gallium/drivers/vc4/vc4_bufmgr.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c
index eef7e9d..cbdb9e8 100644
--- a/src/gallium/drivers/vc4/vc4_bufmgr.c
+++ b/src/gallium/drivers/vc4/vc4_bufmgr.c
@@ -87,9 +87,8 @@ vc4_bo_from_cache(struct vc4_screen *screen, uint32_t size, const char *name)
struct vc4_bo *bo = NULL;
pipe_mutex_lock(cache->lock);
if (!list_empty(&cache->size_list[page_index])) {
- struct vc4_bo *bo = LIST_ENTRY(struct vc4_bo,
- cache->size_list[page_index].next,
- size_list);
+ bo = LIST_ENTRY(struct vc4_bo, cache->size_list[page_index].next,
+ size_list);
/* Check that the BO has gone idle. If not, then we want to
* allocate something new instead, since we assume that the
More information about the mesa-commit
mailing list