From 398cae839819d370813cbe5fb3f6aed4b6cfe035 Mon Sep 17 00:00:00 2001 From: Anuj Verma Date: Wed, 12 Aug 2020 17:27:29 +0530 Subject: [PATCH] [base] Fix memory leaks due to FreeType internals. * src/base/ftobjs.c (ft_remove_renderer): Similar to `ft_add_renderer', remover raster's `glyph_format' check. Due to this the rasterizers which do not have `glyph_format' of `FT_GLYPH_FORMAT_OUTLINE' won't get deallocated (the `raster_done' function is no called). --- [GSoC]ChangeLog | 10 ++++++++++ src/base/ftobjs.c | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[GSoC]ChangeLog b/[GSoC]ChangeLog index 4d1945a70..bb217fcdf 100644 --- a/[GSoC]ChangeLog +++ b/[GSoC]ChangeLog @@ -1,3 +1,13 @@ +2020-08-12 Anuj Verma + + [base] Fix memory leaks due to FreeType internals. + + * src/base/ftobjs.c (ft_remove_renderer): Similar to + `ft_add_renderer', remover raster's `glyph_format' + check. Due to this the rasterizers which do not have + `glyph_format' of `FT_GLYPH_FORMAT_OUTLINE' won't get + deallocated (the `raster_done' function is no called). + 2020-08-12 Anuj Verma [sdf] Fix memory leaks. diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 94b697214..521c5b702 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -4440,8 +4440,7 @@ /* release raster object, if any */ - if ( render->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE && - render->raster ) + if ( render->raster ) render->clazz->raster_class->raster_done( render->raster ); /* remove from list */