[Mesa-dev] [PATCH 1/4] r600/compute: Don't leak compute pool item_list/unallocated_list

Aaron Watry awatry at gmail.com
Thu Aug 21 09:06:42 PDT 2014


Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 src/gallium/drivers/r600/compute_memory_pool.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c
index 9324b84..55ff7d5 100644
--- a/src/gallium/drivers/r600/compute_memory_pool.c
+++ b/src/gallium/drivers/r600/compute_memory_pool.c
@@ -95,6 +95,10 @@ void compute_memory_pool_delete(struct compute_memory_pool* pool)
 		pool->screen->b.b.resource_destroy((struct pipe_screen *)
 			pool->screen, (struct pipe_resource *)pool->bo);
 	}
+    //In theory, all of the actual items were already freed in compute_memory_free... Just need to delete the list heads
+    free(pool->item_list);
+    free(pool->unallocated_list);
+    //And then the pool itself
 	free(pool);
 }
 
-- 
1.9.1



More information about the mesa-dev mailing list