[base] Fix memory leak (#58611).

* src/base/ftobjs.c (FT_New_Size): When the call to `clazz->init_size'
fails, make sure to free `size->internal'.
This commit is contained in:
Sebastian Rasmussen 2020-06-18 15:12:03 +08:00 committed by Werner Lemberg
parent 575b78d9e3
commit a4429959b0
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
[base] Fix memory leak (#58611).
* src/base/ftobjs.c (FT_New_Size): When the call to `clazz->init_size'
fails, make sure to free `size->internal'.
2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
[cff] Fix memory leak (#58610).

View File

@ -2857,6 +2857,7 @@
if ( error )
{
FT_FREE( node );
FT_FREE( size->internal );
FT_FREE( size );
}