pajoye          Tue Jul 22 20:23:21 2003 EDT

  Modified files:              
    /php-src/ext/gd/libgd       gd.c 
  Log:
  - Fix leak when no fill is done (ilia)
  
  
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.61 php-src/ext/gd/libgd/gd.c:1.62
--- php-src/ext/gd/libgd/gd.c:1.61      Tue Jul 22 20:08:57 2003
+++ php-src/ext/gd/libgd/gd.c   Tue Jul 22 20:23:21 2003
@@ -1869,12 +1869,13 @@
                return;
        }
 
-       stack = (struct seg *)emalloc(sizeof(struct seg) * ((int)(im->sy*im->sx)/4)+1);
-       sp = stack;
-
        wx2=im->sx;wy2=im->sy;
        oc = gdImageGetPixel(im, x, y);
        if (oc==nc || x<0 || x>wx2 || y<0 || y>wy2) return;
+
+       stack = (struct seg *)emalloc(sizeof(struct seg) * ((int)(im->sy*im->sx)/4)+1);
+       sp = stack;
+
        /* required! */
        FILL_PUSH(y,x,x,1);
        /* seed segment (popped 1st) */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to