]> granicus.if.org Git - php/commitdiff
fix memory leak
authorStanislav Malyshev <stas@php.net>
Mon, 5 Jan 2015 05:07:57 +0000 (21:07 -0800)
committerStanislav Malyshev <stas@php.net>
Mon, 5 Jan 2015 05:07:57 +0000 (21:07 -0800)
ext/gd/libgd/gd.c

index 54890bc1777ea8757bfae088b88caaee0193d74e..d73f0943af8f3ab694d0c8834ef7604760ba54e6 100644 (file)
@@ -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);