From ad73afcd797b6181cd500ff6e3ccf32fa465dc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 17 Apr 2020 17:08:04 +0200 Subject: [PATCH] label: Unref style_attrs list --- gtk/gtklabel.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index dda9b0d558..c7ab789d6c 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -2852,7 +2852,10 @@ gtk_label_update_layout_attributes (GtkLabel *self, PangoAttrList *attrs; if (self->layout == NULL) - return; + { + pango_attr_list_unref (style_attrs); + return; + } if (self->select_info && self->select_info->links) { @@ -2913,8 +2916,7 @@ gtk_label_update_layout_attributes (GtkLabel *self, pango_layout_set_attributes (self->layout, attrs); - if (attrs) - pango_attr_list_unref (attrs); + pango_attr_list_unref (attrs); } static void