shithub: freetype+ttf2subf

Download patch

ref: a4429959b030e4a6e4aa41baa4306950158224f1
parent: 575b78d9e3b9c701edb5087aa1c5f9c4031d3548
author: Sebastian Rasmussen <sebras@gmail.com>
date: Thu Jun 18 11:12:03 EDT 2020

[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'.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 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).
 
 	* src/cff/cffobjs.c (cff_size_init): When the call to
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -2857,6 +2857,7 @@
     if ( error )
     {
       FT_FREE( node );
+      FT_FREE( size->internal );
       FT_FREE( size );
     }