svn: /php/php-src/ branches/PHP_5_2/ext/gd/libgd/gdft.c branches/PHP_5_3/ext/gd/libgd/gdft.c trunk/ext/gd/libgd/gdft.c
| From: | Takeshi Abe | Date: | Sun, 01 Nov 2009 05:04:35 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_2/ext/gd/libgd/gdft.c branches/PHP_5_3/ext/gd/libgd/gdft.c trunk/ext/gd/libgd/gdft.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-60804@lists.php.net to get a copy of this message | ||
tabe Sun, 01 Nov 2009 05:04:35 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290119
Log:
Fixed a possible memory leak in case that FT_Glyph_To_Bitmap() fails
Changed paths:
U php/php-src/branches/PHP_5_2/ext/gd/libgd/gdft.c
U php/php-src/branches/PHP_5_3/ext/gd/libgd/gdft.c
U php/php-src/trunk/ext/gd/libgd/gdft.c
Modified: php/php-src/branches/PHP_5_2/ext/gd/libgd/gdft.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/gd/libgd/gdft.c 2009-10-31 21:52:47 UTC (rev 290118)
+++ php/php-src/branches/PHP_5_2/ext/gd/libgd/gdft.c 2009-11-01 05:04:35 UTC (rev 290119)
@@ -1090,6 +1090,7 @@
if (render) {
if (image->format != ft_glyph_format_bitmap && FT_Glyph_To_Bitmap(&image,
ft_render_mode_normal, 0, 1)) {
+ FT_Done_Glyph(image);
if (tmpstr) {
gdFree(tmpstr);
}
Modified: php/php-src/branches/PHP_5_3/ext/gd/libgd/gdft.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/gd/libgd/gdft.c 2009-10-31 21:52:47 UTC (rev 290118)
+++ php/php-src/branches/PHP_5_3/ext/gd/libgd/gdft.c 2009-11-01 05:04:35 UTC (rev 290119)
@@ -1090,6 +1090,7 @@
if (render) {
if (image->format != ft_glyph_format_bitmap && FT_Glyph_To_Bitmap(&image,
ft_render_mode_normal, 0, 1)) {
+ FT_Done_Glyph(image);
if (tmpstr) {
gdFree(tmpstr);
}
Modified: php/php-src/trunk/ext/gd/libgd/gdft.c
===================================================================
--- php/php-src/trunk/ext/gd/libgd/gdft.c 2009-10-31 21:52:47 UTC (rev 290118)
+++ php/php-src/trunk/ext/gd/libgd/gdft.c 2009-11-01 05:04:35 UTC (rev 290119)
@@ -1090,6 +1090,7 @@
if (render) {
if (image->format != ft_glyph_format_bitmap && FT_Glyph_To_Bitmap(&image,
ft_render_mode_normal, 0, 1)) {
+ FT_Done_Glyph(image);
if (tmpstr) {
gdFree(tmpstr);
}