Home  |  Linux  | Mysql  | PHP  | XML
From:Takeshi Abe Date:Thu Jul 31 09:24:01 2008
Subject:cvs: gd(GD_2_0) /libgd/src gdft.c
tabe		Thu Jul 31 15:24:01 2008 UTC

  Modified files:              (Branch: GD_2_0)
    /gd/libgd/src	gdft.c 
  Log:
  fixed FS#173.
  
http://cvs.php.net/viewvc.cgi/gd/libgd/src/gdft.c?r1=1.28.2.9&r2=1.28.2.10&diff_format=u
Index: gd/libgd/src/gdft.c
diff -u gd/libgd/src/gdft.c:1.28.2.9 gd/libgd/src/gdft.c:1.28.2.10
--- gd/libgd/src/gdft.c:1.28.2.9	Wed Nov 21 09:00:30 2007
+++ gd/libgd/src/gdft.c	Thu Jul 31 15:24:01 2008
@@ -1583,6 +1583,11 @@
       /* 2.0.22: Thorben Kundinger: +8 is needed, not +6. */
       fullname = gdRealloc (fullname,
                           strlen (fontsearchpath) + strlen (name) + 8);
+      if (!fullname) {
+          free (path);
+          free (fontlist);
+          return "could not alloc full path of font";
+      }
       /* if name is an absolute or relative pathname then test directly */
 #ifdef NETWARE
       /* netware uses the format "volume:/path" or the standard "/path" */
@@ -1598,7 +1603,7 @@
 	    {
 	      font_found++;
               /* 2.0.16: memory leak fixed, Gustavo Scotti */
-              gdFree (path);
+              free (path);
 	      break;
 	    }
 	}
@@ -1643,11 +1648,11 @@
 	      break;
 	    }
 	}
-      gdFree (path);
+      free (path);
       if (font_found)
 	break;
     }
-  gdFree (fontlist);
+  free (fontlist);
   if (!font_found)
     {
       gdFree (fullname);


Navigate in group php.gd.cvs at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants