cvs: php-src /ext/gd/libgd gd.c
| From: | Pierre-Alain Joye | Date: | Wed, 23 Jul 2003 00:23:21 +0000 |
| Subject: | cvs: php-src /ext/gd/libgd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-22733@lists.php.net to get a copy of this message | ||
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) */