[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:
Parth Wazurkar 2018-08-10 18:11:10 +05:30
parent b76b34ef5d
commit fd2b16f01f
2 changed files with 6 additions and 10 deletions

View File

@ -523,7 +523,6 @@
*/
face->tfm_data = fi;
fi = NULL;
}
Exit:

View File

@ -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;
}