Commit 692bbe59daf7046bb5d6951df9f95a1a7ec61c8b

David Turner 2003-04-09T07:03:38

* src/base/ftmac.c (open_face_from_buffer): removed a double-free bug that had nasty consequences when trying to open an "invalid" font on a Mac.

diff --git a/ChangeLog b/ChangeLog
index 74b7b1e..b8b3d0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-09  Torrey Lyons  <torrey@mrcla.com>
+
+   * src/base/ftmac.c (open_face_from_buffer): removed a double-free bug that
+   had nasty consequences when trying to open an "invalid" font on a Mac.
+
 2003-04-09  Mike Fabian  <mfabian@suse.de>
 
    * src/bdf/bdfdrivr.h, src/pcf/pcf.h: changed FT_Short to FT_UShort in
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index 2d37d39..a09b7b1 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -541,11 +541,6 @@
     error = FT_Open_Face( library, &args, face_index, aface );
     if ( error == FT_Err_Ok )
       (*aface)->face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM;
-    else
-    {
-      FT_Stream_CloseFunc( stream );
-      FT_FREE( stream );
-    }
 
     return error;
   }