shithub: freetype+ttf2subf

Download patch

ref: 309b8b31e0319e659b32a0187fc52e56943882cc
parent: 8ac5c5c8a570fdb9a92e8f811e3ea5b623188ee1
author: Werner Lemberg <[email protected]>
date: Sun Dec 16 14:08:36 EST 2012

[sfnt] Fix Savannah bug #37936.

* src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-12-16  Werner Lemberg  <[email protected]>
+
+	[sfnt] Fix Savannah bug #37936.
+
+	* src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak.
+
 2012-12-15  Alexei Podtelezhnikov  <[email protected]>
 
 	[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  <[email protected]>
 
--- 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++ )
     {