Commit ee86e563 authored by Michael Natterer's avatar Michael Natterer 😴

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.
parent b812d624
Pipeline #111953 passed with stages
in 15 minutes and 48 seconds
......@@ -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);
}
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment