summaryrefslogtreecommitdiff
path: root/navit/graphics
diff options
context:
space:
mode:
authorrphlx <rphlx@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-06-17 15:52:40 +0000
committerrphlx <rphlx@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-06-17 15:52:40 +0000
commit7bc0c14f305d1d8ede5fb954c8f659e592e588fe (patch)
tree89965e7f7557dc31430444b7393491d22f46625d /navit/graphics
parent40aa474dcae2797a72b7923459f98c13796f6bb8 (diff)
downloadnavit-svn-7bc0c14f305d1d8ede5fb954c8f659e592e588fe.tar.gz
Fix:graphics_gtk+sdl: ft glyph leak in bbox (valgrind)
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1136 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/graphics')
-rw-r--r--navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c1
-rw-r--r--navit/graphics/sdl/graphics_sdl.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c b/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
index 51b5a7fe..c125d344 100644
--- a/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
+++ b/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
@@ -584,6 +584,7 @@ get_text_bbox(struct graphics_priv *gr, struct graphics_font_priv *font, char *t
FT_Load_Glyph(font->face, glyph_index, FT_LOAD_DEFAULT );
FT_Get_Glyph(font->face->glyph, &glyph);
FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_pixels, &glyph_bbox );
+ FT_Done_Glyph(glyph);
glyph_bbox.xMin += x >> 6;
glyph_bbox.xMax += x >> 6;
glyph_bbox.yMin += y >> 6;
diff --git a/navit/graphics/sdl/graphics_sdl.c b/navit/graphics/sdl/graphics_sdl.c
index f5396c16..c90c812c 100644
--- a/navit/graphics/sdl/graphics_sdl.c
+++ b/navit/graphics/sdl/graphics_sdl.c
@@ -370,6 +370,7 @@ get_text_bbox(struct graphics_priv *gr, struct graphics_font_priv *font, char *t
FT_Load_Glyph(font->face, glyph_index, FT_LOAD_DEFAULT );
FT_Get_Glyph(font->face->glyph, &glyph);
FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_pixels, &glyph_bbox );
+ FT_Done_Glyph(glyph);
glyph_bbox.xMin += x >> 6;
glyph_bbox.xMax += x >> 6;
glyph_bbox.yMin += y >> 6;