shaped-texture: Clean up texture regions

We allocated texture regions, but didn't free them when finished,
causing a leak.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/653
This commit is contained in:
Jonas Ådahl 2018-10-20 15:47:50 +02:00
parent 71a62bb18f
commit 8200995fdb

View File

@ -516,6 +516,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
}
else
{
opaque_tex_region = NULL;
use_opaque_region = FALSE;
}
@ -659,6 +660,8 @@ meta_shaped_texture_paint (ClutterActor *actor)
}
}
g_clear_pointer (&clip_tex_region, cairo_region_destroy);
g_clear_pointer (&opaque_tex_region, cairo_region_destroy);
g_clear_pointer (&blended_tex_region, cairo_region_destroy);
}