Permalink
Browse files

These need to be volatile in order to prevent leaking after the

longjmp in the error handler
  • Loading branch information...
1 parent 153bfad commit f452b9056e89aa1bf18d6c0828ba709c0f8df854 @rlerdorf rlerdorf committed Nov 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 ext/gd/libgd/gd_png.c
View
4 ext/gd/libgd/gd_png.c
@@ -127,8 +127,8 @@ gdImagePtr gdImageCreateFromPngCtx (gdIOCtx * infile)
png_color_16p trans_gray_rgb;
png_color_16p trans_color_rgb;
png_bytep trans;
- png_bytep image_data = NULL;
- png_bytepp row_pointers = NULL;
+ volatile png_bytep image_data = NULL;
+ volatile png_bytepp row_pointers = NULL;
gdImagePtr im = NULL;
int i, j, *open = NULL;
volatile int transparent = -1;

0 comments on commit f452b90

Please sign in to comment.