com php-src: fix memory leak: ext/gd/libgd/gd.c
| From: | Stanislav Malyshev | Date: | Mon, 05 Jan 2015 05:07:57 +0000 |
| Subject: | com php-src: fix memory leak: ext/gd/libgd/gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83982@lists.php.net to get a copy of this message | ||
Commit: 184b6d9e731e6a37abaa1ee07caa6d7f699caa10
Author: Stanislav Malyshev <stas@php.net> Sun, 4 Jan 2015 21:07:57 -0800
Parents: eeae4651f72244f68a15e4be69a465b66b1661f7
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=184b6d9e731e6a37abaa1ee07caa6d7f699caa10
Log:
fix memory leak
Changed paths:
M ext/gd/libgd/gd.c
Diff:
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 54890bc..d73f094 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -3051,8 +3051,8 @@ int gdImagePaletteToTrueColor(gdImagePtr src)
}
}
- /* free old palette buffer */
- for (yy = y - 1; yy >= yy - 1; yy--) {
+ /* free old palette buffer (y is sy) */
+ for (yy = 0; yy < y; yy++) {
gdFree(src->pixels[yy]);
}
gdFree(src->pixels);