[gimp] app: fix gimp_plug_in_cleanup_item_new().



commit ee09ae7245e7e6445b46622f95e18fb8302b761f
Author: Jehan <jehan girinstud io>
Date:   Sat Aug 14 18:20:49 2021 +0200

    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.

 app/plug-in/gimpplugin-cleanup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/plug-in/gimpplugin-cleanup.c b/app/plug-in/gimpplugin-cleanup.c
index a15c4bce0f..f76254c2b6 100644
--- a/app/plug-in/gimpplugin-cleanup.c
+++ b/app/plug-in/gimpplugin-cleanup.c
@@ -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;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]