cvs: gd(GD_2_0) /libgd/src gdft.c
[email protected] ("Takeshi Abe") Thu, 31 Jul 2008 15:24:01 -0000
| Newsgroups | php.gd.cvs |
|---|---|
| Message-ID | <cvstabe1217517841@cvsserver> |
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);