WepP loader: Fix memory leak in error path

This commit is contained in:
Kim Woelders 2019-09-29 11:03:58 +02:00
parent 09d9a95054
commit 701f87ffa6
1 changed files with 2 additions and 0 deletions

View File

@ -103,6 +103,8 @@ load(ImlibImage * im, ImlibProgressFunction progress,
(uint8_t *) im->data, webp_buffer_size,
im->w * 4) == NULL)
{
free(im->data);
im->data = NULL;
free(encoded_data);
return 0;
}