cogl-atlas-texture: Fix a memory leak
authorNeil Roberts <neil@linux.intel.com>
Tue, 13 Apr 2010 16:26:03 +0000 (17:26 +0100)
committerNeil Roberts <neil@linux.intel.com>
Tue, 13 Apr 2010 16:26:03 +0000 (17:26 +0100)
The CoglAtlasTexture struct was not being freed in
_cogl_atlas_texture_free so there would be a small leak whenever a
texture was destroyed.

Thanks to Robert Bragg for spotting this.

clutter/cogl/cogl/cogl-atlas-texture.c

index 81e9b8c..0835e73 100644 (file)
@@ -273,6 +273,8 @@ _cogl_atlas_texture_free (CoglAtlasTexture *atlas_tex)
   _cogl_atlas_texture_remove_from_atlas (atlas_tex);
 
   cogl_handle_unref (atlas_tex->sub_texture);
+
+  g_free (atlas_tex);
 }
 
 static int