[libpng16] Free tRNS chunk data when abandoning it
diff --git a/pngset.c b/pngset.c
index d6b5403..750fc2c 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1038,6 +1038,7 @@
           {
             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;
           }
       }