From e4a2f220e0e7a868fa6f56b0cb82c0ee97ab1ba6 Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 15 Aug 2016 16:16:20 -0700 Subject: [PATCH] Bug 769959 - crash during WebP file loading WebPDataClear() was called on already-free'd data. --- plug-ins/file-webp/file-webp-load.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plug-ins/file-webp/file-webp-load.c b/plug-ins/file-webp/file-webp-load.c index 05b7fdd14f..0b669f2c5f 100644 --- a/plug-ins/file-webp/file-webp-load.c +++ b/plug-ins/file-webp/file-webp-load.c @@ -149,9 +149,6 @@ load_image (const gchar *filename, /* Attempt to decode the data as a WebP image */ outdata = WebPDecodeRGBA (indata, indatalen, &width, &height); - /* Free the original compressed data */ - g_free (indata); - /* Check to ensure the image data was loaded correctly */ if (! outdata) return -1; @@ -208,7 +205,8 @@ load_image (const gchar *filename, } } - WebPDataClear (&wp_data); + /* Free the original compressed data */ + g_free (indata); if (icc) {