diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-12-27 19:17:41 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-01-01 10:21:21 -0700 |
commit | 6883e02a5cab528623e11ad7717f1052ab2e031d (patch) | |
tree | 293aa9299bfa54a62bf41ec3855a5407bf4d9a5a /src/mesa | |
parent | 4fabee9d4d217bb18411b6c481416775aead029e (diff) |
fix a mem leak, document another existing leak
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/pipe/cso_cache/cso_hash.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/pipe/cso_cache/cso_hash.c b/src/mesa/pipe/cso_cache/cso_hash.c index fe033c9e91..0338cb3b47 100644 --- a/src/mesa/pipe/cso_cache/cso_hash.c +++ b/src/mesa/pipe/cso_cache/cso_hash.c @@ -101,8 +101,15 @@ static void *cso_data_allocate_node(struct cso_hash_data *hash) return malloc(hash->nodeSize); } -static void cso_data_free_node(void *node) +static void cso_data_free_node(struct cso_node *node) { + /* XXX still a leak here. + * Need to cast value ptr to original cso type, then free the + * driver-specific data hanging off of it. For example: + struct cso_sampler *csamp = (struct cso_sampler *) node->value; + free(csamp->data); + */ + free(node->value); free(node); } |