iliaa Wed Aug 11 19:25:50 2004 EDT
Modified files:
/php-src/ext/gd/libgd gd_topal.c
Log:
Fixed memory leak.
http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd_topal.c?r1=1.16&r2=1.17&ty=u
Index: php-src/ext/gd/libgd/gd_topal.c
diff -u php-src/ext/gd/libgd/gd_topal.c:1.16 php-src/ext/gd/libgd/gd_topal.c:1.17
--- php-src/ext/gd/libgd/gd_topal.c:1.16 Thu Jul 22 18:38:59 2004
+++ php-src/ext/gd/libgd/gd_topal.c Wed Aug 11 19:25:50 2004
@@ -1926,7 +1926,8 @@
init_error_limit (oim, nim, cquantize);
arraysize = (size_t) ((nim->sx + 2) * (3 * sizeof (FSERROR)));
/* Allocate Floyd-Steinberg workspace. */
- cquantize->fserrors = gdCalloc (arraysize, 1);
+ cquantize->fserrors = gdRealloc(cquantize->fserrors, arraysize);
+ memset(cquantize->fserrors, 0, arraysize);
if (!cquantize->fserrors)
{
goto outOfMemory;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php