forked from minhngoc25a/freetype2
[cff] Free table upon error allocating other data (#58609).
* src/cff/cffload.c (cff_index_get_pointers): When new_bytes fails to allocate, make sure to free the table. Do the same for both allocations if there is a later error.
This commit is contained in:
parent
7438235b42
commit
c8cd139c30
|
@ -1,3 +1,11 @@
|
|||
2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
|
||||
|
||||
[cff] Free table upon error allocating other data (#58609).
|
||||
|
||||
* src/cff/cffload.c (cff_index_get_pointers): When new_bytes fails
|
||||
to allocate, make sure to free the table. Do the same for both
|
||||
allocations if there is a later error.
|
||||
|
||||
2020-06-13 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
Remove redundant inclusion of `ft2build.h'.
|
||||
|
|
|
@ -489,6 +489,10 @@
|
|||
}
|
||||
|
||||
Exit:
|
||||
if ( error && new_bytes )
|
||||
FT_FREE( new_bytes );
|
||||
if ( error && t )
|
||||
FT_FREE( t );
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue