From 309b8b31e0319e659b32a0187fc52e56943882cc Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 16 Dec 2012 19:08:36 +0100 Subject: [PATCH] [sfnt] Fix Savannah bug #37936. * src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak. --- ChangeLog | 8 +++++++- src/sfnt/ttload.c | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa36dc11c..2ca32d0cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-12-16 Werner Lemberg + + [sfnt] Fix Savannah bug #37936. + + * src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak. + 2012-12-15 Alexei Podtelezhnikov [base] Fix 11-year old bug. @@ -705,7 +711,7 @@ Revert the last commit 45337b07. - * src/base/ftstroke.c (FT_Stroker_New): Revert the previous chenge. + * src/base/ftstroke.c (FT_Stroker_New): Revert the previous change. 2012-07-11 Alexei Podtelezhnikov diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index 16914f265..7ffdbeeff 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -1242,11 +1242,11 @@ num_ranges = face->gasp.numRanges; FT_TRACE3(( "numRanges: %u\n", num_ranges )); - if ( FT_QNEW_ARRAY( gaspranges, num_ranges ) || - FT_FRAME_ENTER( num_ranges * 4L ) ) + if ( FT_QNEW_ARRAY( face->gasp.gaspRanges, num_ranges ) || + FT_FRAME_ENTER( num_ranges * 4L ) ) goto Exit; - face->gasp.gaspRanges = gaspranges; + gaspranges = face->gasp.gaspRanges; for ( j = 0; j < num_ranges; j++ ) {