summaryrefslogtreecommitdiff
path: root/pngrutil.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-08-01 15:24:21 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-08-01 15:24:21 -0500
commitbc68c41d5ffbff856c3a3c29af047bee19710a58 (patch)
tree3f8f897eaf2a27a78af500f7654cacba812c200b /pngrutil.c
parent4aad3c0eb0f7e112d50296e48878e332519f0333 (diff)
downloadlibpng-bc68c41d5ffbff856c3a3c29af047bee19710a58.tar.gz
[libpng16] Initialized btoa[] in pngstest.c; stop memory leak in png_handle_eXIf()
when returning with an error.
Diffstat (limited to 'pngrutil.c')
-rw-r--r--pngrutil.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pngrutil.c b/pngrutil.c
index f0e172897..3be7c17cc 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -2039,7 +2039,10 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
}
if (png_crc_finish(png_ptr, 0) != 0)
+ {
+ png_free(png_ptr, eXIf_buf);
return;
+ }
png_set_eXIf_1(png_ptr, info_ptr, length, eXIf_buf);