diff options
author | Stanislav Malyshev <stas@php.net> | 2015-01-04 21:07:57 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2015-01-04 21:07:57 -0800 |
commit | 184b6d9e731e6a37abaa1ee07caa6d7f699caa10 (patch) | |
tree | bcf317b5fa6723e4e9b15cbf204e8b92ae6060f1 | |
parent | eeae4651f72244f68a15e4be69a465b66b1661f7 (diff) | |
download | php-git-184b6d9e731e6a37abaa1ee07caa6d7f699caa10.tar.gz |
fix memory leak
-rw-r--r-- | ext/gd/libgd/gd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 54890bc177..d73f0943af 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); |