shithub: freetype+ttf2subf

Download patch

ref: de0a96c5dd7f8156f684c10c32462b28dcfe29d3
parent: 8cfa8bd51ac9017f84eeb7e12e749e25e0ba6891
author: Suzuki, Toshiya (鈴木俊哉) <[email protected]>
date: Fri May 19 19:16:12 EDT 2006

* fix 2 memory leaks in MacOS resource fork handler, Savannah bug #16631

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2006-05-19  suzuki toshiya  <[email protected]>
 
+	Apply patch by Derek Clegg to fix 2 memory leak in MacOS resource
+	fork handler, Savannah bug #16631.
+
+	* src/base/ftobjs.c (load_face_in_embedded_rfork):
+	Replace FT_Stream_Close() by FT_Stream_Free() to fix memory leak.
+
+	* src/base/ftrfrk.c (raccess_guess_linux_double_from_file_name):
+	Replace FT_Stream_Close() by FT_Stream_Free() to fix memory leak.
+
+2006-05-19  suzuki toshiya  <[email protected]>
+
 	* build/unix/configure.raw: Add a fallback to disable Carbon
 	dependency, if configured with no options on Mac OS X.
 
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1531,7 +1531,7 @@
 
       error = IsMacResource( library, stream2, offsets[i],
                              face_index, aface );
-      FT_Stream_Close( stream2 );
+      FT_Stream_Free( stream2, 0 );
 
       FT_TRACE3(( "%s\n", error ? "failed": "successful" ));
 
--- a/src/base/ftrfork.c
+++ b/src/base/ftrfork.c
@@ -647,7 +647,7 @@
     error = raccess_guess_apple_double( library, stream2, file_name,
                                         &nouse, result_offset );
 
-    FT_Stream_Close( stream2 );
+    FT_Stream_Free( stream2, 0 );
 
     return error;
   }