webpmux: fix memory leak by calling WebPMuxDelete()
This commit is contained in:
@ -144,7 +144,10 @@ load_image (const gchar *filename,
|
|||||||
|
|
||||||
/* Check to ensure the image data was loaded correctly */
|
/* Check to ensure the image data was loaded correctly */
|
||||||
if (! outdata)
|
if (! outdata)
|
||||||
return -1;
|
{
|
||||||
|
WebPMuxDelete (mux);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
create_layer (image_ID, outdata, 0, _("Background"),
|
create_layer (image_ID, outdata, 0, _("Background"),
|
||||||
width, height);
|
width, height);
|
||||||
@ -173,6 +176,7 @@ load_image (const gchar *filename,
|
|||||||
WebPDemuxDelete (demux);
|
WebPDemuxDelete (demux);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebPMuxDelete (mux);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,6 +281,8 @@ load_image (const gchar *filename,
|
|||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebPMuxDelete (mux);
|
||||||
|
|
||||||
gimp_image_set_filename (image_ID, filename);
|
gimp_image_set_filename (image_ID, filename);
|
||||||
|
|
||||||
return image_ID;
|
return image_ID;
|
||||||
|
@ -316,6 +316,8 @@ save_layer (const gchar *filename,
|
|||||||
rewind (outfile);
|
rewind (outfile);
|
||||||
webp_anim_file_writer (outfile, wp_data.bytes, wp_data.size);
|
webp_anim_file_writer (outfile, wp_data.bytes, wp_data.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebPMuxDelete (mux);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user