index: libpng-1.6.36/pngread.c
===================================================================
--- libpng-1.6.36.orig/pngread.c	2018-12-01 15:36:00.000000000 +0100
+++ libpng-1.6.36/pngread.c	2019-01-28 12:41:14.044709070 +0100
@@ -994,6 +994,11 @@ png_read_destroy(png_structrp png_ptr)
    png_ptr->chunk_list = NULL;
 #endif
 
+#if PNG_ARM_NEON_IMPLEMENTATION == 1
+   png_free(png_ptr, png_ptr->riffled_palette);
+   png_ptr->riffled_palette = NULL;
+#endif
+
    /* NOTE: the 'setjmp' buffer may still be allocated and the memory and error
     * callbacks are still set at this point.  They are required to complete the
     * destruction of the png_struct itself.
