From adefba1b03089ce10293892b432f5154b4f5e543 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 16 Oct 2017 21:03:43 -0500 Subject: [PATCH] [libpng16] Free tRNS chunk data when abandoning it --- pngset.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pngset.c b/pngset.c index d6b540384..750fc2c38 100644 --- a/pngset.c +++ b/pngset.c @@ -1038,6 +1038,7 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr, { png_warning(png_ptr, "tRNS chunk has out-of-range samples for bit_depth"); + png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); return; } }