From 54e4bf8b758336c3330bc3eca597e804a9491be7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 23 Aug 2020 11:59:41 -0400 Subject: [PATCH] Fix a leak in the font chooser widget Contrary to what you may expect, pango_attr_font_desc_new() is not transfer full, it makes a copy of the font description. --- gtk/gtkfontchooserwidget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index 6463a66520..480cd88d54 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -505,6 +505,7 @@ get_font_attributes (GObject *ignore, font_desc = pango_font_face_describe (face); attribute = pango_attr_font_desc_new (font_desc); pango_attr_list_insert (attrs, attribute); + pango_font_description_free (font_desc); } return attrs;