[gimp] plug-ins: fix static analysis warning.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: fix static analysis warning.
- Date: Thu, 21 Oct 2021 10:02:04 +0000 (UTC)
commit 4dcbafc29224cbee9ef4c17a6eb31dc05e8f81bb
Author: Jehan <jehan girinstud io>
Date: Thu Oct 21 11:59:10 2021 +0200
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…
plug-ins/common/file-raw-data.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/plug-ins/common/file-raw-data.c b/plug-ins/common/file-raw-data.c
index 3b5b6ae320..82dc65a970 100644
--- a/plug-ins/common/file-raw-data.c
+++ b/plug-ins/common/file-raw-data.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]