[libpng16] Avoid a possible memory leak in contrib/gregbook/readpng.c

This commit is contained in:
Glenn Randers-Pehrson 2013-03-01 13:27:05 -06:00
parent e444514a94
commit 1118d6d985
3 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.6.1beta05 - February 27, 2013
Libpng 1.6.1beta05 - March 1, 2013
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -60,11 +60,12 @@ Version 1.6.1beta03 [February 22, 2013]
Version 1.6.1beta04 [February 27, 2013]
Revised INSTALL to recommend using CPPFLAGS instead of INCLUDES.
Revised scripts/makefile.freebsd to respect ZLIBDIR and ZLIBINC.
Revised scripts/makefile.freebsd to respect ZLIBLIB and ZLIBINC.
Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble
with CRLF line endings.
Version 1.6.1beta05 [February 27, 2013]
Version 1.6.1beta05 [March 1, 2013]
Avoid a possible memory leak in contrib/gregbook/readpng.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -4417,11 +4417,12 @@ Version 1.6.1beta03 [February 22, 2013]
Version 1.6.1beta04 [February 27, 2013]
Revised INSTALL to recommend using CPPFLAGS instead of INCLUDES.
Revised scripts/makefile.freebsd to respect ZLIBDIR and ZLIBINC.
Revised scripts/makefile.freebsd to respect ZLIBLIB and ZLIBINC.
Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble
with CRLF line endings.
Version 1.6.1beta05 [February 27, 2013]
Version 1.6.1beta05 [March 1, 2013]
Avoid a possible memory leak in contrib/gregbook/readpng.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -215,6 +215,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;
}