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.
This commit is contained in:
Michael Natterer 2019-09-05 16:24:09 +02:00
parent b812d6241a
commit ee86e5630e
4 changed files with 16 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -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