Commit 2715f6ab 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 67fe47c7
......@@ -163,6 +163,7 @@ void
dzl_bolding_label_set_weight (DzlBoldingLabel *self,
PangoWeight weight)
{
PangoAttrList *filtered;
PangoAttrList *attrs;
PangoAttrList *copy;
PangoAttribute *attr;
......@@ -175,10 +176,11 @@ dzl_bolding_label_set_weight (DzlBoldingLabel *self,
else
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