From 7ef0d8661afb31a446e36f33cdae31bd4398c99d Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 13 Oct 2015 08:14:20 +0200 Subject: [PATCH] [truetype] Fix memory leak for broken GX fonts (#46188). * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of deallocation. --- ChangeLog | 7 +++++++ src/truetype/ttgxvar.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73a717bfc..96e45a6a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-10-13 Werner Lemberg + + [truetype] Fix memory leak for broken GX fonts (#46188). + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of + deallocation. + 2015-10-13 Werner Lemberg [truetype] Fix commit from 2015-10-10. diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 31954e228..2f115042a 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -2059,8 +2059,6 @@ if ( localpoints != ALL_POINTS ) FT_FREE( localpoints ); - if ( sharedpoints != ALL_POINTS ) - FT_FREE( sharedpoints ); FT_FREE( deltas_x ); FT_FREE( deltas_y ); @@ -2072,6 +2070,8 @@ FT_TRACE5(( "\n" )); Fail2: + if ( sharedpoints != ALL_POINTS ) + FT_FREE( sharedpoints ); FT_FREE( tuple_coords ); FT_FREE( im_start_coords ); FT_FREE( im_end_coords );