diff --git a/ChangeLog b/ChangeLog index 87bb49154..b380a72ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2020-06-19 Sebastian Rasmussen + + [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 [base] Rework d1180b5f9598 until further notice. diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 2b4e6bb8e..78164c8cb 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2857,7 +2857,8 @@ if ( error ) { FT_FREE( node ); - FT_FREE( size->internal ); + if ( size ) + FT_FREE( size->internal ); FT_FREE( size ); }