[gegl] gegl: Fix possible use after free in geglmodule.



commit 4bd7bd6ca996e3fc83bd465224632adfa5610eb8
Author: Axel Viala <axel viala darnuria eu>
Date:   Fri Apr 1 13:48:42 2022 +0200

    gegl: Fix possible use after free in geglmodule.

 gegl/module/geglmoduledb.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/gegl/module/geglmoduledb.c b/gegl/module/geglmoduledb.c
index 700564a2e..aaf6ebf09 100644
--- a/gegl/module/geglmoduledb.c
+++ b/gegl/module/geglmoduledb.c
@@ -261,11 +261,7 @@ gegl_module_db_remove_duplicates (GeglModuleDB *db)
 
   }
 
-  while (suffix_entries)
-  {
-    g_free (suffix_entries->data);
-    suffix_entries = g_list_remove (suffix_entries, suffix_entries->data);
-  }
+  g_list_free_full(suffix_entries, g_free);
 }
 #endif
 


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