mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
primitive: Don't leak indices
If a CoglPrimitive is associated with a set of indices then we must unref those indices when freeing the primitive to avoid a leak. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 45cac786b55c953e44f98b864add952b9e398b13)
This commit is contained in:
parent
74d749eca4
commit
971b5cfae1
@ -380,6 +380,9 @@ _cogl_primitive_free (CoglPrimitive *primitive)
|
||||
g_slice_free1 (sizeof (CoglAttribute *) * primitive->n_attributes,
|
||||
primitive->attributes);
|
||||
|
||||
if (primitive->indices)
|
||||
cogl_object_unref (primitive->indices);
|
||||
|
||||
g_slice_free1 (sizeof (CoglPrimitive) +
|
||||
sizeof (CoglAttribute *) *
|
||||
(primitive->n_embedded_attributes - 1), primitive);
|
||||
|
Loading…
Reference in New Issue
Block a user