summaryrefslogtreecommitdiff
path: root/gtk/font_pango.c
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2016-02-08 14:59:35 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2016-02-08 14:59:35 +0000
commit9cb522ce38b54156380edff162e32f36e3e9a20c (patch)
tree86c876f2c78a26b884dc1b09b19b09745bfd6022 /gtk/font_pango.c
parent255361a885aa06f5462d7517cd58666f20f6cd17 (diff)
downloadnetsurf-9cb522ce38b54156380edff162e32f36e3e9a20c.tar.gz
netsurf-9cb522ce38b54156380edff162e32f36e3e9a20c.tar.bz2
Don't haemorrhage Pango layouts out of nsfont_paint.
Before: LEAK SUMMARY: definitely lost: 143,462 bytes in 811 blocks indirectly lost: 835,174 bytes in 16,656 blocks possibly lost: 104,465 bytes in 1,631 blocks still reachable: 3,634,180 bytes in 30,844 blocks suppressed: 0 bytes in 0 blocks After: LEAK SUMMARY: definitely lost: 57,990 bytes in 258 blocks indirectly lost: 218,013 bytes in 5,995 blocks possibly lost: 110,118 bytes in 1,837 blocks still reachable: 3,637,842 bytes in 30,881 blocks suppressed: 0 bytes in 0 blocks
Diffstat (limited to 'gtk/font_pango.c')
-rw-r--r--gtk/font_pango.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk/font_pango.c b/gtk/font_pango.c
index c1bddd89d..e83619ad8 100644
--- a/gtk/font_pango.c
+++ b/gtk/font_pango.c
@@ -250,6 +250,7 @@ bool nsfont_paint(int x, int y, const char *string, size_t length,
nsgtk_set_colour(fstyle->foreground);
pango_cairo_show_layout_line(current_cr, line);
+ g_object_unref(layout);
pango_font_description_free(desc);
return true;