iliaa           Wed Aug 11 19:25:52 2004 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src/ext/gd/libgd       gd_topal.c 
  Log:
  MFH: Fixed memory leak.
  
  
http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd_topal.c?r1=1.15.2.1&r2=1.15.2.2&ty=u
Index: php-src/ext/gd/libgd/gd_topal.c
diff -u php-src/ext/gd/libgd/gd_topal.c:1.15.2.1 
php-src/ext/gd/libgd/gd_topal.c:1.15.2.2
--- php-src/ext/gd/libgd/gd_topal.c:1.15.2.1    Thu Jul 22 18:59:11 2004
+++ php-src/ext/gd/libgd/gd_topal.c     Wed Aug 11 19:25:52 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

Reply via email to