projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1640390
)
inscription: Plug a memory leak
author
Matthias Clasen
<mclasen@redhat.com>
Sat, 13 Aug 2022 00:02:58 +0000
(20:02 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sat, 13 Aug 2022 00:35:36 +0000
(20:35 -0400)
PangoFontMetrics also need to be freed.
gtk/gtkinscription.c
patch
|
blob
|
history
diff --git
a/gtk/gtkinscription.c
b/gtk/gtkinscription.c
index edad5f7ac9cc379835adf1d62f92ac1643b63a1b..7ce22702eb84f0892fb43d6ed1d82584c3f74370 100644
(file)
--- a/
gtk/gtkinscription.c
+++ b/
gtk/gtkinscription.c
@@
-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;