projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fabee9
)
fix a mem leak, document another existing leak
author
Brian
<brian.paul@tungstengraphics.com>
Fri, 28 Dec 2007 02:17:41 +0000
(19:17 -0700)
committer
Brian
<brian.paul@tungstengraphics.com>
Tue, 1 Jan 2008 17:21:21 +0000
(10:21 -0700)
src/mesa/pipe/cso_cache/cso_hash.c
patch
|
blob
|
history
diff --git
a/src/mesa/pipe/cso_cache/cso_hash.c
b/src/mesa/pipe/cso_cache/cso_hash.c
index fe033c9e912e2685602ad13f998aa1504e1d4e68..0338cb3b4748a0883a2664da0e4f7a6b06e8e936 100644
(file)
--- 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);
}