From 38d4962c20c691c605d3c3292621a5eafe5a3f7e Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 10 Dec 2024 07:56:03 -0300 Subject: [PATCH] clutter/paint-nodes: Use g_autoptr Tighten up the refcount of the CoglTexture created by the blur node. This seems to make Coverity happier. Coverity CID: #1575122 Part-of: --- clutter/clutter/clutter-paint-nodes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c index 0dd9a0919..a9cb13b2b 100644 --- a/clutter/clutter/clutter-paint-nodes.c +++ b/clutter/clutter/clutter-paint-nodes.c @@ -1598,13 +1598,13 @@ clutter_blur_node_new (unsigned int width, float radius) { g_autoptr (CoglOffscreen) offscreen = NULL; + g_autoptr (CoglTexture) texture = NULL; g_autoptr (GError) error = NULL; ClutterLayerNode *layer_node; ClutterBlurNode *blur_node; ClutterContext *context; ClutterBackend *backend; CoglContext *cogl_context; - CoglTexture *texture; ClutterBlur *blur; g_return_val_if_fail (radius >= 0.0, NULL); @@ -1618,7 +1618,6 @@ clutter_blur_node_new (unsigned int width, cogl_texture_set_premultiplied (texture, TRUE); offscreen = cogl_offscreen_new_with_texture (texture); - g_object_unref (texture); if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (offscreen), &error)) { g_warning ("Unable to allocate paint node offscreen: %s",