* src/base/ftobjs.c (FT_Done_Library): Modules are removed in the

reversed order so that type42 module is removed before truetype
module.  This avoids double free in some occasions.
This commit is contained in:
Wu, Chia-I (吳佳一) 2006-02-28 09:53:23 +00:00
parent e9a47198e6
commit a87b08a7af
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-02-28 Chia-I Wu <b90201047@ntu.edu.tw>
* src/base/ftobjs.c (FT_Done_Library): Modules are removed in the
reversed order so that type42 module is removed before truetype
module. This avoids double free in some occasions.
2006-02-28 David Turner <david@freetype.org>
* tagging VER-2-2-0-RC4

View File

@ -3721,8 +3721,12 @@
/* Close all modules in the library */
#if 1
/* XXX Modules are removed in the reversed order so that */
/* type42 module is removed before truetype module. This */
/* avoids double free in some occasions. It is a hack. */
while ( library->num_modules > 0 )
FT_Remove_Module( library, library->modules[0] );
FT_Remove_Module( library,
library->modules[library->num_modules - 1] );
#else
{
FT_UInt n;