Bug 769959 - crash during WebP file loading

WebPDataClear() was called on already-free'd data.
This commit is contained in:
skal 2016-08-15 16:16:20 -07:00 committed by Jehan
parent 9e9cd496f7
commit e4a2f220e0
1 changed files with 2 additions and 4 deletions

View File

@ -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)
{