mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
fix a mem leak, document another existing leak
This commit is contained in:
parent
4fabee9d4d
commit
6883e02a5c
1 changed files with 8 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue