[libpng16] Free tRNS chunk data when abandoning it

This commit is contained in:
Glenn Randers-Pehrson 2017-10-16 21:03:43 -05:00
parent 48a2460393
commit adefba1b03

View File

@ -1038,6 +1038,7 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr,
{ {
png_warning(png_ptr, png_warning(png_ptr,
"tRNS chunk has out-of-range samples for bit_depth"); "tRNS chunk has out-of-range samples for bit_depth");
png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);
return; return;
} }
} }