[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).
This commit is contained in:
Anuj Verma 2020-08-12 17:27:29 +05:30
parent d2796ed059
commit 398cae8398
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,13 @@
2020-08-12 Anuj Verma <anujv@iitbhilai.ac.in>
[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 <anujv@iitbhilai.ac.in>
[sdf] Fix memory leaks.

View File

@ -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 */