Fix memory leak (#58624).

* src/base/ftobjs.c (FT_New_Size): Avoid trying to free
  `size->internal`, unless `size' has been allocated. This
  mistake appeared in the fix for 58611.
This commit is contained in:
Sebastian Rasmussen 2020-06-19 16:21:08 +08:00 committed by Werner Lemberg
parent 6e722f2eaa
commit 09b98060d3
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
[base] Fix memory leak (#58624).
* src/base/ftobjs.c (FT_New_Size): Avoid trying to free
`size->internal' unless `size' has been allocated. This mistake
appeared in the fix for issue #58611.
2020-06-19 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Rework d1180b5f9598 until further notice.

View File

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