fix a small memory leak when FT_Init_FreeType fails for some reason
This commit is contained in:
parent
91aaf3267b
commit
dddd068e5d
@ -1,5 +1,8 @@
|
||||
2007-03-05 David Turner <david@freetype.org>
|
||||
|
||||
* src/base/ftinit.c (FT_Init_FreeType): fixed a small memory leak
|
||||
when FT_Init_FreeType fails for some reason
|
||||
|
||||
* src/truetype/ttobs.c (tt_size_init_bytecode): bugfix, we need to
|
||||
clear the x_ppem and y_ppem fields of the TT_Size.metrics structure,
|
||||
note those of TT_Size.root.metrics. duh !!
|
||||
|
@ -124,7 +124,11 @@
|
||||
/* default drivers. */
|
||||
|
||||
error = FT_New_Library( memory, alibrary );
|
||||
if ( !error )
|
||||
if (error)
|
||||
{
|
||||
FT_Done_Memory(memory);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*alibrary)->version_major = FREETYPE_MAJOR;
|
||||
(*alibrary)->version_minor = FREETYPE_MINOR;
|
||||
|
Loading…
Reference in New Issue
Block a user