app: fix gimp_plug_in_cleanup_item_new().

This fixes a memory leak as reported by Massimo.
But even more, we fix the code logics, as the cleanup items were never
added to the `item_cleanups` list.
This commit is contained in:
Jehan 2021-08-14 18:20:49 +02:00
parent c7b3c3c629
commit ee09ae7245
1 changed files with 2 additions and 2 deletions

View File

@ -516,8 +516,8 @@ gimp_plug_in_cleanup_item_new (GimpPlugInProcFrame *proc_frame,
cleanup->item = item;
cleanup->item_id = gimp_item_get_id (item);
proc_frame->item_cleanups = g_list_remove (proc_frame->item_cleanups,
cleanup);
proc_frame->item_cleanups = g_list_prepend (proc_frame->item_cleanups,
cleanup);
return cleanup;
}