Commit e9200d2c authored by Skal's avatar Skal

webpmux: fix memory leak by calling WebPMuxDelete()

parent 5d428194
......@@ -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;
......
......@@ -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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment