Mesa (master): r600/compute: Don't leak compute pool item_list/ unallocated_list
Aaron Watry
awatry at kemper.freedesktop.org
Fri Aug 29 22:38:48 UTC 2014
Module: Mesa
Branch: master
Commit: 7c73ee677f162f5308020f0a25ba39d1682927fd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c73ee677f162f5308020f0a25ba39d1682927fd
Author: Aaron Watry <awatry at gmail.com>
Date: Wed Aug 20 18:24:00 2014 -0500
r600/compute: Don't leak compute pool item_list/unallocated_list
v3: Fix multi-line comment format
v2: Change to C-style comments and fix indentation
Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Bruno Jiménez <brunojimen at gmail.com>
---
src/gallium/drivers/r600/compute_memory_pool.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c
index 9324b84..30b77a4 100644
--- a/src/gallium/drivers/r600/compute_memory_pool.c
+++ b/src/gallium/drivers/r600/compute_memory_pool.c
@@ -95,6 +95,12 @@ 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 items were freed in compute_memory_free.
+ * Just delete the list heads
+ */
+ free(pool->item_list);
+ free(pool->unallocated_list);
+ /* And then the pool itself */
free(pool);
}
More information about the mesa-commit
mailing list