summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-01-04 21:08:16 -0800
committerStanislav Malyshev <stas@php.net>2015-01-04 21:08:16 -0800
commit95183cc33918efe39098fa4adb3b3b13eaa1eee7 (patch)
tree29746f2cf09a25157109c648dd0f5303132fec30
parentec550cd783e9cac8715c1c88b56654b2819bc0ec (diff)
parent184b6d9e731e6a37abaa1ee07caa6d7f699caa10 (diff)
downloadphp-git-95183cc33918efe39098fa4adb3b3b13eaa1eee7.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: fix memory leak
-rw-r--r--ext/gd/libgd/gd.c4
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);