[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.
GSoC-2018-parth
Parth Wazurkar 6 years ago
parent b76b34ef5d
commit fd2b16f01f
  1. 1
      src/gf/gfdrivr.c
  2. 15
      src/tfm/tfmobjs.c

@ -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…
Cancel
Save