[gtk/matthiasc/for-master: 5/7] Fix a leak in the font chooser widget




commit 54e4bf8b758336c3330bc3eca597e804a9491be7
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Aug 23 11:59:41 2020 -0400

    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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]