inscription: Plug a memory leak
authorMatthias Clasen <mclasen@redhat.com>
Sat, 13 Aug 2022 00:02:58 +0000 (20:02 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 13 Aug 2022 00:35:36 +0000 (20:35 -0400)
PangoFontMetrics also need to be freed.

gtk/gtkinscription.c

index edad5f7ac9cc379835adf1d62f92ac1643b63a1b..7ce22702eb84f0892fb43d6ed1d82584c3f74370 100644 (file)
@@ -344,9 +344,9 @@ get_line_pixels (GtkInscription *self,
   int ascent, descent;
 
   metrics = gtk_inscription_get_font_metrics (self);
-
   ascent = pango_font_metrics_get_ascent (metrics);
   descent = pango_font_metrics_get_descent (metrics);
+  pango_font_metrics_unref (metrics);
 
   if (baseline)
     *baseline = ascent;