ref: 09b98060d3e0edfe78ea88ca8b851751a924ecac
parent: 6e722f2eaa5840e6b8c6f1eaa6a1fce9d7f90833
author: Sebastian Rasmussen <sebras@gmail.com>
date: Fri Jun 19 12:21:08 EDT 2020
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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
--- 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 );
}