Mesa (master): i965g: Fix memory leak.
Vinson Lee
vlee at kemper.freedesktop.org
Sun Feb 21 23:16:13 UTC 2010
Module: Mesa
Branch: master
Commit: c786df2caf54584f1a307d820cbd947db706e20c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c786df2caf54584f1a307d820cbd947db706e20c
Author: Vinson Lee <vlee at vmware.com>
Date: Sun Feb 21 15:15:52 2010 -0800
i965g: Fix memory leak.
---
src/gallium/drivers/i965/brw_state_cache.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/i965/brw_state_cache.c b/src/gallium/drivers/i965/brw_state_cache.c
index 85c2007..c911f39 100644
--- a/src/gallium/drivers/i965/brw_state_cache.c
+++ b/src/gallium/drivers/i965/brw_state_cache.c
@@ -213,7 +213,7 @@ brw_upload_cache( struct brw_cache *cache,
void *aux_return,
struct brw_winsys_buffer **bo_out)
{
- struct brw_cache_item *item = CALLOC_STRUCT(brw_cache_item);
+ struct brw_cache_item *item;
GLuint hash = hash_key(key, key_size, relocs, nr_relocs);
GLuint relocs_size = nr_relocs * sizeof relocs[0];
GLuint aux_size = cache->aux_size[cache_id];
@@ -233,6 +233,7 @@ brw_upload_cache( struct brw_cache *cache,
if (ret)
return ret;
+ item = CALLOC_STRUCT(brw_cache_item);
/* Set up the memory containing the key, aux_data, and relocs */
tmp = MALLOC(key_size + aux_size + relocs_size);
More information about the mesa-commit
mailing list