felipe Wed Jul 1 12:04:05 2009 UTC
Modified files:
/php-src/ext/gd gd.c
Log:
- Fixed memory leak
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.418&r2=1.419&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.418 php-src/ext/gd/gd.c:1.419
--- php-src/ext/gd/gd.c:1.418 Fri Jun 19 22:12:20 2009
+++ php-src/ext/gd/gd.c Wed Jul 1 12:04:05 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.418 2009/06/19 22:12:20 kalle Exp $ */
+/* $Id: gd.c,v 1.419 2009/07/01 12:04:05 felipe Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -3347,7 +3347,12 @@
}
}
- ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd);
+ if (!ZEND_FETCH_RESOURCE_NO_RETURN(im, gdImagePtr, &IM, -1, "Image",
le_gd)) {
+ if (str_type == IS_UNICODE) {
+ efree(str.s);
+ RETURN_FALSE;
+ }
+ }
font = php_find_gd_font(size TSRMLS_CC);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php