Commit 33966984 authored by Christian Hergert's avatar Christian Hergert

bolding: release allocated list when filtering

The filter function returns a newly allocated list that we are responsible
to free.
parent 1691307d
......@@ -158,6 +158,7 @@ void
dzl_bolding_label_set_weight (DzlBoldingLabel *self,
PangoWeight weight)
PangoAttrList *filtered;
PangoAttrList *attrs;
PangoAttrList *copy;
PangoAttribute *attr;
......@@ -170,10 +171,11 @@ dzl_bolding_label_set_weight (DzlBoldingLabel *self,
copy = pango_attr_list_new ();
attr = pango_attr_weight_new (weight);
pango_attr_list_filter (copy, remove_weights, attr);
filtered = pango_attr_list_filter (copy, remove_weights, attr);
pango_attr_list_insert (copy, attr);
gtk_label_set_attributes (GTK_LABEL (self), copy);
gtk_widget_queue_draw (GTK_WIDGET (self));
pango_attr_list_unref (filtered);
pango_attr_list_unref (copy);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment