GtkImage: do not leak metrics in baseline align

https://bugzilla.gnome.org/show_bug.cgi?id=699020
This commit is contained in:
Paolo Borelli 2013-04-27 11:08:21 +02:00
parent b957e16695
commit d35596fe92

View File

@ -1417,6 +1417,8 @@ gtk_image_get_baseline_align (GtkImage *image)
image->priv->baseline_align =
(float)pango_font_metrics_get_ascent (metrics) /
(pango_font_metrics_get_ascent (metrics) + pango_font_metrics_get_descent (metrics));
pango_font_metrics_unref (metrics);
}
return image->priv->baseline_align;