[gimp] libgimp: don't leak the GPParam array after writing procedure return values
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: don't leak the GPParam array after writing procedure return values
- Date: Thu, 5 Sep 2019 14:26:00 +0000 (UTC)
commit ee86e5630ea3d6c9afa33a3b2876aec045e531d1
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 5 16:24:09 2019 +0200
libgimp: don't leak the GPParam array after writing procedure return values
Annotate all calls to g_free(GPParam*) with /* FIXME leaking object arrays */
because we now do, and it needs to be fixed.
app/plug-in/gimpplugin-message.c | 1 +
app/plug-in/gimppluginmanager-call.c | 8 ++++++++
libgimp/gimppdb.c | 1 +
libgimp/gimpplugin.c | 6 ++++++
4 files changed, 16 insertions(+)
---
diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c
index 70420d2ad3..a5cef95737 100644
--- a/app/plug-in/gimpplugin-message.c
+++ b/app/plug-in/gimpplugin-message.c
@@ -624,6 +624,7 @@ gimp_plug_in_handle_proc_run (GimpPlugIn *plug_in,
gimp_plug_in_close (plug_in, TRUE);
}
+ /* FIXME leaking object arrays */
g_free (proc_return.params);
}
diff --git a/app/plug-in/gimppluginmanager-call.c b/app/plug-in/gimppluginmanager-call.c
index e85d94e934..a405da1538 100644
--- a/app/plug-in/gimppluginmanager-call.c
+++ b/app/plug-in/gimppluginmanager-call.c
@@ -63,6 +63,7 @@ gimp_allow_set_foreground_window (GimpPlugIn *plug_in)
#endif
}
+
/* public functions */
void
@@ -244,6 +245,8 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
g_free (config.display_name);
g_free (config.icon_theme_dir);
+
+ /* FIXME leaking object arrays */
g_free (proc_run.params);
g_object_unref (plug_in);
@@ -257,6 +260,8 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
g_free (config.display_name);
g_free (config.icon_theme_dir);
+
+ /* FIXME leaking object arrays */
g_free (proc_run.params);
/* If this is an extension,
@@ -336,6 +341,7 @@ gimp_plug_in_manager_call_run_temp (GimpPlugInManager *manager,
_("Failed to run plug-in \"%s\""),
name);
+ /* FIXME leaking object arrays */
g_free (proc_run.params);
gimp_plug_in_proc_frame_pop (plug_in);
@@ -345,8 +351,10 @@ gimp_plug_in_manager_call_run_temp (GimpPlugInManager *manager,
return return_vals;
}
+
gimp_allow_set_foreground_window (plug_in);
+ /* FIXME leaking object arrays */
g_free (proc_run.params);
g_object_ref (plug_in);
diff --git a/libgimp/gimppdb.c b/libgimp/gimppdb.c
index 8b03f67fa0..1551eedfca 100644
--- a/libgimp/gimppdb.c
+++ b/libgimp/gimppdb.c
@@ -302,6 +302,7 @@ gimp_pdb_run_procedure_array (GimpPDB *pdb,
&proc_run, pdb->priv->plug_in))
gimp_quit ();
+ /* FIXME leaking object arrays */
g_free (proc_run.params);
_gimp_plug_in_read_expect_msg (pdb->priv->plug_in, &msg, GP_PROC_RETURN);
diff --git a/libgimp/gimpplugin.c b/libgimp/gimpplugin.c
index 40a867a410..b91e3e8946 100644
--- a/libgimp/gimpplugin.c
+++ b/libgimp/gimpplugin.c
@@ -1126,6 +1126,9 @@ gimp_plug_in_proc_run (GimpPlugIn *plug_in,
if (! gp_proc_return_write (plug_in->priv->write_channel,
&proc_return, plug_in))
gimp_quit ();
+
+ /* FIXME leaking object arrays */
+ g_free (proc_return.params);
}
static void
@@ -1147,6 +1150,9 @@ gimp_plug_in_temp_proc_run (GimpPlugIn *plug_in,
if (! gp_temp_proc_return_write (plug_in->priv->write_channel,
&proc_return, plug_in))
gimp_quit ();
+
+ /* FIXME leaking object arrays */
+ g_free (proc_return.params);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]