diff options
author | Werner Lemberg <wl@gnu.org> | 2019-07-12 11:36:12 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2019-07-12 11:36:12 +0200 |
commit | b110acba9e6f7e40314f0da5d249cb3cb3beeab8 (patch) | |
tree | 2dd16af59ef1dd2888f2c63c954787583402b3ef /src/winfonts | |
parent | 12e4307dc7b48c9a4a4fc3ac6c32220874ab18ec (diff) | |
download | freetype2-b110acba9e6f7e40314f0da5d249cb3cb3beeab8.tar.gz |
[sfnt, winfonts] Avoid memory leaks in case of error (#56587).
* src/sfnt/sfwoff.c (woff_open_font): Call `FT_FRAME_EXIT' in case
of error.
* src/winfonts/winfnt.c (fnt_face_get_dll_font): Ditto.
Diffstat (limited to 'src/winfonts')
-rw-r--r-- | src/winfonts/winfnt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c index 2d771be2c..97eb6fc34 100644 --- a/src/winfonts/winfnt.c +++ b/src/winfonts/winfnt.c @@ -331,7 +331,7 @@ { FT_TRACE2(( "invalid alignment shift count for resource data\n" )); error = FT_THROW( Invalid_File_Format ); - goto Exit; + goto Exit1; } @@ -597,6 +597,10 @@ Exit: return error; + + Exit1: + FT_FRAME_EXIT(); + goto Exit; } |