From fb5a98eaf1af49da9c31f09831981f9332d4c35d Mon Sep 17 00:00:00 2001 From: oetiker Date: Fri, 6 Apr 2007 07:28:33 +0000 Subject: [PATCH] release font resources after thy have been used ... -- Travis Spencer git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@1029 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_gfx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/program/src/rrd_gfx.c b/program/src/rrd_gfx.c index 9c204f3b..99e2c774 100644 --- a/program/src/rrd_gfx.c +++ b/program/src/rrd_gfx.c @@ -620,11 +620,16 @@ int gfx_render_png (gfx_canvas_t *canvas, (long)(node->size*64), (long)(100*canvas->zoom), (long)(100*canvas->zoom)); - if ( error ) break; + if ( error ) { + FT_Done_Face(face); + break; + } pen_x = node->x * canvas->zoom; pen_y = node->y * canvas->zoom; string = gfx_string_create (canvas, face, node->text, node->angle, node->tabwidth, node->size); + FT_Done_Face(face); + switch(node->halign){ case GFX_H_RIGHT: vec.x = -string->bbox.xMax; break; -- 2.30.2