[gimp/gimp-2-10] app: fix gimp_plug_in_cleanup_item_new().



commit e976481034500112ac4cc8010bf7d1a0d2dec115
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.
    
    (cherry picked from commit ee09ae7245e7e6445b46622f95e18fb8302b761f)

 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 8c8d6d60d8..96c81d8ed8 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]