[cff] Fix memory leak (#58610).
* src/cff/cffobjs.c (cff_size_init): When the call to `funcs->create' fails, make sure to free `internal'.
This commit is contained in:
parent
74cebeae12
commit
575b78d9e3
@ -1,3 +1,10 @@
|
||||
2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
|
||||
|
||||
[cff] Fix memory leak (#58610).
|
||||
|
||||
* src/cff/cffobjs.c (cff_size_init): When the call to
|
||||
`funcs->create' fails, make sure to free `internal'.
|
||||
|
||||
2020-06-19 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/cff/cffload.c (cff_index_get_pointers): Rename `t' to `tbl'.
|
||||
|
@ -166,15 +166,16 @@
|
||||
FT_Error error = FT_Err_Ok;
|
||||
PSH_Globals_Funcs funcs = cff_size_get_globals_funcs( size );
|
||||
|
||||
FT_Memory memory = cffsize->face->memory;
|
||||
CFF_Internal internal = NULL;
|
||||
|
||||
|
||||
if ( funcs )
|
||||
{
|
||||
CFF_Face face = (CFF_Face)cffsize->face;
|
||||
CFF_Font font = (CFF_Font)face->extra.data;
|
||||
CFF_Internal internal = NULL;
|
||||
CFF_Face face = (CFF_Face)cffsize->face;
|
||||
CFF_Font font = (CFF_Font)face->extra.data;
|
||||
|
||||
PS_PrivateRec priv;
|
||||
FT_Memory memory = cffsize->face->memory;
|
||||
|
||||
FT_UInt i;
|
||||
|
||||
@ -206,6 +207,9 @@
|
||||
size->strike_index = 0xFFFFFFFFUL;
|
||||
|
||||
Exit:
|
||||
if ( error )
|
||||
FT_FREE( internal );
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user