From 581afd1516b183a30ef33418d57dbd6f80c5de84 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Sat, 21 Feb 2026 20:51:04 +0000 Subject: [PATCH] core: Fix GEGL warning after bucket fill In 6279d7b7, I did not free the GEGL buffer created by gimp_pickable_get_buffer_with_effects (). This resulted in an "EEEEeEeek! 1 GeglBuffers leaked" warning on exit, which of course could cumulate. This patch makes to sure to clear out the src_buffer both times it's used. --- app/core/gimppickable-contiguous-region.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/core/gimppickable-contiguous-region.cc b/app/core/gimppickable-contiguous-region.cc index a3327564c4..a099c7fcf6 100644 --- a/app/core/gimppickable-contiguous-region.cc +++ b/app/core/gimppickable-contiguous-region.cc @@ -133,7 +133,7 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable, gint x, gint y) { - GeglBuffer *src_buffer; + GeglBuffer *src_buffer = NULL; GeglBuffer *mask_buffer; const Babl *format; GeglRectangle extent; @@ -184,6 +184,7 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable, GIMP_TIMER_END("foo"); } + g_clear_object (&src_buffer); return mask_buffer; } @@ -202,7 +203,7 @@ gimp_pickable_contiguous_region_by_color (GimpPickable *pickable, * fuzzy_select. Modify the pickable's mask to reflect the * additional selection */ - GeglBuffer *src_buffer; + GeglBuffer *src_buffer = NULL; GeglBuffer *mask_buffer; const Babl *format; gint n_components; @@ -283,6 +284,7 @@ gimp_pickable_contiguous_region_by_color (GimpPickable *pickable, } } }); + g_clear_object (&src_buffer); return mask_buffer; }