clutter/text: Plug a pipeline leak

ClutterText paints selected text using the selection_paint()
function. This function has to main branches of execution:
when the position is in the selection bound, or not. In the
former, we are leaking the CoglPipeline created by copying
the default color pipeline.

Unref the copied pipeline after using it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3007>
This commit is contained in:
Georges Basile Stavracas Neto 2023-05-12 10:35:16 -03:00 committed by Marge Bot
parent 0e8356936c
commit 28774a23aa

View File

@ -1986,6 +1986,8 @@ selection_paint (ClutterText *self,
priv->cursor_rect.origin.y,
priv->cursor_rect.origin.x + priv->cursor_rect.size.width,
priv->cursor_rect.origin.y + priv->cursor_rect.size.height);
g_clear_pointer (&color_pipeline, cogl_object_unref);
}
else
{