diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2023-03-06 22:41:17 -0500 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2023-03-06 22:48:21 -0500 |
commit | b36193d025b970a338f41b8ab15f010a428c345e (patch) | |
tree | 0d1ab7302fe4eea031c7ad7ddcdefd17e260c6d3 | |
parent | de94e2cbfbbb65ad2242023b056a52a5427af9fc (diff) | |
download | freetype2-b36193d025b970a338f41b8ab15f010a428c345e.tar.gz |
* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Triage memory leak.
This leak has been introduced in the previous commit and immediately
detected:
https://chromium-review.googlesource.com/c/chromium/src/+/4313202
-rw-r--r-- | src/truetype/ttgload.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 52f8ea8bc..cca81b41c 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -453,6 +453,8 @@ /* and thus allocate the bytecode array size by ourselves */ if ( n_ins ) { + if ( exec->glyphSize ) + FT_FREE( exec->glyphIns ); if ( FT_QNEW_ARRAY( exec->glyphIns, n_ins ) ) return error; |