diff --git a/libgimp/gimpbrushselectbutton.c b/libgimp/gimpbrushselectbutton.c index fd5801b19e..1ea11ec239 100644 --- a/libgimp/gimpbrushselectbutton.c +++ b/libgimp/gimpbrushselectbutton.c @@ -231,6 +231,7 @@ gimp_brush_select_button_get_brush_bitmap (GimpBrushSelectButton *self) result.mask_data = g_bytes_unref_to_data (mask_data, &mask_size); /* Discard any color data, bitmap is B&W i.e. i.e. depth one i.e. a mask */ g_bytes_unref (color_data); + g_object_unref (brush); return result; } diff --git a/libgimp/gimpgradientselectbutton.c b/libgimp/gimpgradientselectbutton.c index 5cbeee5250..019417d32e 100644 --- a/libgimp/gimpgradientselectbutton.c +++ b/libgimp/gimpgradientselectbutton.c @@ -191,6 +191,8 @@ get_gradient_data (GimpGradientSelectButton *self, *sample_count = n_samples; } + g_object_unref (gradient); + /* When result is true, caller must free the array. */ return result; } diff --git a/libgimp/gimppatternselectbutton.c b/libgimp/gimppatternselectbutton.c index 3d2fa3c90b..da5a175206 100644 --- a/libgimp/gimppatternselectbutton.c +++ b/libgimp/gimppatternselectbutton.c @@ -235,6 +235,8 @@ gimp_pattern_select_button_get_pattern_image (GimpPatternSelectButton *self) &color_bytes); result.pixelels = g_bytes_unref_to_data (color_bytes, &pixelels_size); + g_object_unref (pattern); + return result; }