plug-ins: fix static analysis warning.

I had completely forgotten about Coverity Scan but today received an
email with some new scan results. This was one of the warnings that we
had a possible resource leak.

In truth, this is mostly a false positive since gimp_export_image() will
flatten the image. Yet why not be thorough…
This commit is contained in:
Jehan 2021-10-21 11:59:10 +02:00
parent 0d5a4f50aa
commit 4dcbafc292
1 changed files with 6 additions and 0 deletions

View File

@ -594,6 +594,12 @@ raw_save (GimpProcedure *procedure,
g_set_error (&error, G_FILE_ERROR, 0,
_("RAW export does not support multiple layers."));
if (export == GIMP_EXPORT_EXPORT)
{
gimp_image_delete (image);
g_free (drawables);
}
return gimp_procedure_new_return_values (procedure,
GIMP_PDB_CALLING_ERROR,
error);