diff options
Diffstat (limited to 'contrib/gregbook/readpng.c')
-rw-r--r-- | contrib/gregbook/readpng.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/gregbook/readpng.c b/contrib/gregbook/readpng.c index abfc1fb4c..a3362aebf 100644 --- a/contrib/gregbook/readpng.c +++ b/contrib/gregbook/readpng.c @@ -214,6 +214,10 @@ uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes) * libpng function */ if (setjmp(png_jmpbuf(png_ptr))) { + free(image_data); + image_data = NULL; + free(row_pointers); + row_pointers = NULL; png_destroy_read_struct(&png_ptr, &info_ptr, NULL); return NULL; } |