From d35596fe92f840afe13949c7d5af21623a7aa44d Mon Sep 17 00:00:00 2001 From: Paolo Borelli Date: Sat, 27 Apr 2013 11:08:21 +0200 Subject: [PATCH] GtkImage: do not leak metrics in baseline align https://bugzilla.gnome.org/show_bug.cgi?id=699020 --- gtk/gtkimage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index f21f227309..61c41b97ee 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -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;