mirror of https://github.com/GNOME/gimp.git
webpmux: fix memory leak by calling WebPMuxDelete()
This commit is contained in:
parent
5d4281944f
commit
e9200d2c00
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue