mirror of https://github.com/freetype/freetype
[tfm] Resolve memory leak errors.
* src/tfm/tfmobjs.c(tfm_close): Remove double freeing of `stream' object. * src/gf/gfdrivr.c(TFM_Read_Metrics): Fix oversight errors.
This commit is contained in:
parent
b76b34ef5d
commit
fd2b16f01f
|
@ -523,7 +523,6 @@
|
|||
*/
|
||||
|
||||
face->tfm_data = fi;
|
||||
fi = NULL;
|
||||
}
|
||||
|
||||
Exit:
|
||||
|
|
|
@ -131,9 +131,9 @@
|
|||
FT_LOCAL( void )
|
||||
tfm_close( TFM_Parser parser )
|
||||
{
|
||||
FT_Memory memory = parser->memory;
|
||||
FT_UNUSED( parser );
|
||||
|
||||
FT_FREE( parser->stream );
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
|
||||
|
@ -346,13 +346,10 @@
|
|||
fi->slant = (FT_ULong)((double)fi->slant/(double)(1<<20));
|
||||
|
||||
Exit:
|
||||
if( !ci || !w || !h || !d )
|
||||
{
|
||||
FT_FREE(ci);
|
||||
FT_FREE(w);
|
||||
FT_FREE(h);
|
||||
FT_FREE(d);
|
||||
}
|
||||
FT_FREE(ci);
|
||||
FT_FREE(w);
|
||||
FT_FREE(h);
|
||||
FT_FREE(d);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue