diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2020-06-18 15:12:03 +0800 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2020-06-19 03:57:21 +0200 |
commit | a4429959b030e4a6e4aa41baa4306950158224f1 (patch) | |
tree | f8a1db2ad02f441e97cdc5862408e69006b64904 | |
parent | 575b78d9e3b9c701edb5087aa1c5f9c4031d3548 (diff) | |
download | freetype2-a4429959b030e4a6e4aa41baa4306950158224f1.tar.gz |
[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'.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/base/ftobjs.c | 1 |
2 files changed, 8 insertions, 0 deletions
@@ -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 diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 532a06d15..2b4e6bb8e 100644 --- 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 ); } |