From 2f952932f34d00399a5ef29c7d57c8747d109995 Mon Sep 17 00:00:00 2001 From: Jehan Date: Wed, 4 Sep 2024 13:57:01 +0200 Subject: [PATCH] libgimpconfig: fix leak. As far as I understand, the created types are never "unregistered" and will live in the process until it ends. It cannot even have a custom class_finalize() (looking at g_type_register_static()'s code, a CRITICAL is emitted if you try to provide a class_finalize() implementation). So let's just free the allocated pspecs at the end of class_init() instead. --- libgimpconfig/gimpconfig-register.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgimpconfig/gimpconfig-register.c b/libgimpconfig/gimpconfig-register.c index e10ca1bdb5..f39a545deb 100644 --- a/libgimpconfig/gimpconfig-register.c +++ b/libgimpconfig/gimpconfig-register.c @@ -174,6 +174,8 @@ gimp_config_class_init (GObjectClass *klass, g_type_name (G_TYPE_FROM_INSTANCE (pspec)), pspec->name, type_name); } } + + g_free (pspecs); } static void