webpmux: fix memory leak by calling WebPMuxDelete()

This commit is contained in:
Skal 2018-11-28 13:37:39 +01:00
parent 5d4281944f
commit e9200d2c00
2 changed files with 9 additions and 1 deletions

View File

@ -144,7 +144,10 @@ load_image (const gchar *filename,
/* Check to ensure the image data was loaded correctly */
if (! outdata)
return -1;
{
WebPMuxDelete (mux);
return -1;
}
create_layer (image_ID, outdata, 0, _("Background"),
width, height);
@ -173,6 +176,7 @@ load_image (const gchar *filename,
WebPDemuxDelete (demux);
}
WebPMuxDelete (mux);
return -1;
}
@ -277,6 +281,8 @@ load_image (const gchar *filename,
g_object_unref (file);
}
WebPMuxDelete (mux);
gimp_image_set_filename (image_ID, filename);
return image_ID;

View File

@ -316,6 +316,8 @@ save_layer (const gchar *filename,
rewind (outfile);
webp_anim_file_writer (outfile, wp_data.bytes, wp_data.size);
}
WebPMuxDelete (mux);
}
else
{