From 28774a23aa853f26fba90ad04a10576651e6713e Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 12 May 2023 10:35:16 -0300 Subject: [PATCH] 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: --- clutter/clutter/clutter-text.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clutter/clutter/clutter-text.c b/clutter/clutter/clutter-text.c index 331372c92..96ed09df7 100644 --- a/clutter/clutter/clutter-text.c +++ b/clutter/clutter/clutter-text.c @@ -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 {