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.
This commit is contained in:
Jehan 2024-09-04 13:57:01 +02:00
parent d7fadf9fe6
commit 2f952932f3
1 changed files with 2 additions and 0 deletions

View File

@ -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