4befcd
--- freetype-2.9.1/builds/unix/freetype-config.in
4befcd
+++ freetype-2.9.1/builds/unix/freetype-config.in
4befcd
@@ -32,9 +32,6 @@ cflags=`%PKG_CONFIG% --cflags freetype2`
4befcd
 dynamic_libs=`pkgconf --libs freetype2`
4befcd
 static_libs=`pkgconf --static --libs freetype2`
4befcd
 
4befcd
-orig_prefix=$prefix
4befcd
-orig_exec_prefix=$exec_prefix
4befcd
-
4befcd
 orig_includedir=$includedir
4befcd
 orig_libdir=$libdir
4befcd
 
4befcd
--- freetype-2.9.1/ft2demos-2.9.1/src/ftbench.c
4befcd
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftbench.c
4befcd
@@ -749,6 +749,7 @@
4befcd
         {
4befcd
           fprintf( stderr,
4befcd
                    "couldn't allocate memory to pre-load font file\n" );
4befcd
+          fclose( file );
4befcd
 
4befcd
           return 1;
4befcd
         }
4befcd
@@ -758,9 +759,12 @@
4befcd
           fprintf( stderr, "read error\n" );
4befcd
           free( memory_file );
4befcd
           memory_file = NULL;
4befcd
+          fclose( file );
4befcd
 
4befcd
           return 1;
4befcd
         }
4befcd
+
4befcd
+        fclose( file );
4befcd
       }
4befcd
 
4befcd
       error = FT_New_Memory_Face( lib,
4befcd
--- freetype-2.9.1/ft2demos-2.9.1/src/ftchkwd.c
4befcd
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftchkwd.c
4befcd
@@ -118,8 +118,8 @@
4befcd
     FT_Library  library;
4befcd
 
4befcd
     int         i, file_index;
4befcd
-    char        filename[1024 + 4];
4befcd
-    char        alt_filename[1024 + 4];
4befcd
+    char        filename[1024 + 5];
4befcd
+    char        alt_filename[1024 + 5];
4befcd
     char*       execname;
4befcd
     char*       fname;
4befcd
 
4befcd
@@ -169,8 +169,8 @@
4befcd
 #ifndef macintosh
4befcd
       if ( i >= 0 )
4befcd
       {
4befcd
-        strncpy( filename + strlen( filename ), ".ttf", 4 );
4befcd
-        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
4befcd
+        strncpy( filename + strlen( filename ), ".ttf", 5 );
4befcd
+        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
4befcd
       }
4befcd
 #endif
4befcd
 
4befcd
--- freetype-2.9.1/ft2demos-2.9.1/src/ftcommon.c
4befcd
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftcommon.c
4befcd
@@ -110,7 +110,10 @@
4befcd
 
4befcd
     if ( mode != gr_pixel_mode_gray  &&
4befcd
          mode != gr_pixel_mode_rgb24 )
4befcd
+    {
4befcd
+      free( display );
4befcd
       return NULL;
4befcd
+    }
4befcd
 
4befcd
     grInitDevices();
4befcd
 
4befcd
--- freetype-2.9.1/ft2demos-2.9.1/src/ftdump.c
4befcd
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftdump.c
4befcd
@@ -775,8 +775,8 @@
4befcd
         char*  argv[] )
4befcd
   {
4befcd
     int    i, file;
4befcd
-    char   filename[1024 + 4];
4befcd
-    char   alt_filename[1024 + 4];
4befcd
+    char   filename[1024 + 5];
4befcd
+    char   alt_filename[1024 + 5];
4befcd
     char*  execname;
4befcd
     int    num_faces;
4befcd
     int    option;
4befcd
@@ -872,8 +872,8 @@
4befcd
 
4befcd
     if ( i >= 0 )
4befcd
     {
4befcd
-      strncpy( filename + strlen( filename ), ".ttf", 4 );
4befcd
-      strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
4befcd
+      strncpy( filename + strlen( filename ), ".ttf", 5 );
4befcd
+      strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
4befcd
     }
4befcd
 #endif
4befcd
 
4befcd
--- freetype-2.9.1/ft2demos-2.9.1/src/ftgrid.c
4befcd
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftgrid.c
4befcd
@@ -662,6 +662,7 @@
4befcd
         break;
4befcd
 
4befcd
       default:
4befcd
+        free( t );
4befcd
         return;
4befcd
     }
4befcd
 
4befcd
--- freetype-2.9.1/ft2demos-2.9.1/src/ftlint.c
4befcd
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftlint.c
4befcd
@@ -62,8 +62,8 @@
4befcd
   {
4befcd
     int           i, file_index;
4befcd
     unsigned int  id;
4befcd
-    char          filename[1024 + 4];
4befcd
-    char          alt_filename[1024 + 4];
4befcd
+    char          filename[1024 + 5];
4befcd
+    char          alt_filename[1024 + 5];
4befcd
     char*         execname;
4befcd
     char*         fname;
4befcd
 
4befcd
@@ -119,8 +119,8 @@
4befcd
 #ifndef macintosh
4befcd
       if ( i >= 0 )
4befcd
       {
4befcd
-        strncpy( filename + strlen( filename ), ".ttf", 4 );
4befcd
-        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
4befcd
+        strncpy( filename + strlen( filename ), ".ttf", 5 );
4befcd
+        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
4befcd
       }
4befcd
 #endif
4befcd
       i     = (int)strlen( filename );
4befcd
--- freetype-2.9.1/ft2demos-2.9.1/src/ftmemchk.c
4befcd
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftmemchk.c
4befcd
@@ -227,8 +227,8 @@ int  main( int argc, char** argv )
4befcd
 {
4befcd
     int           i, file_index;
4befcd
     unsigned int  id;
4befcd
-    char          filename[1024 + 4];
4befcd
-    char          alt_filename[1024 + 4];
4befcd
+    char          filename[1024 + 5];
4befcd
+    char          alt_filename[1024 + 5];
4befcd
     char*         execname;
4befcd
     char*         fname;
4befcd
 
4befcd
@@ -270,8 +270,8 @@ int  main( int argc, char** argv )
4befcd
 #ifndef macintosh
4befcd
       if ( i >= 0 )
4befcd
       {
4befcd
-        strncpy( filename + strlen( filename ), ".ttf", 4 );
4befcd
-        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
4befcd
+        strncpy( filename + strlen( filename ), ".ttf", 5 );
4befcd
+        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
4befcd
       }
4befcd
 #endif
4befcd
       i     = strlen( filename );
4befcd
--- freetype-2.9.1/ft2demos-2.9.1/src/fttimer.c
4befcd
+++ freetype-2.9.1/ft2demos-2.9.1/src/fttimer.c
4befcd
@@ -162,8 +162,8 @@
4befcd
         char**  argv )
4befcd
   {
4befcd
     int    i, total, base, rendered_glyphs;
4befcd
-    char   filename[1024 + 4];
4befcd
-    char   alt_filename[1024 + 4];
4befcd
+    char   filename[1024 + 5];
4befcd
+    char   alt_filename[1024 + 5];
4befcd
 
4befcd
     long   t, t0, tz0;
4befcd
 
4befcd
@@ -230,8 +230,8 @@
4befcd
 
4befcd
     if ( i >= 0 )
4befcd
     {
4befcd
-      strncpy( filename + strlen( filename ), ".ttf", 4 );
4befcd
-      strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
4befcd
+      strncpy( filename + strlen( filename ), ".ttf", 5 );
4befcd
+      strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
4befcd
     }
4befcd
 
4befcd
     /* Initialize engine */