libgimp: properly free resources from the config.

Found by the definitely useful libgimp warnings:

> gimp_plug_in_destroy_proxies: ERROR: GimpPattern proxy with ID 13 was refed by plug-in, it MUST NOT do that!
This commit is contained in:
Jehan 2023-08-16 23:36:39 +02:00
parent 6601e861c4
commit 19a005ad0f
3 changed files with 5 additions and 0 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}