mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
gobject: unref unused class
If g_type_class_ref() returns a class which is not a GObjectClass we need to unref it before return in object_interface_check_properties(). https://bugzilla.gnome.org/show_bug.cgi?id=706983
This commit is contained in:
parent
ace7658b28
commit
6a8c2685be
@ -1404,9 +1404,12 @@ object_interface_check_properties (gpointer check_data,
|
||||
|
||||
class = g_type_class_ref (iface_class->g_instance_type);
|
||||
|
||||
if (!G_IS_OBJECT_CLASS (class))
|
||||
if (class == NULL)
|
||||
return;
|
||||
|
||||
if (!G_IS_OBJECT_CLASS (class))
|
||||
goto out;
|
||||
|
||||
pspecs = g_param_spec_pool_list (pspec_pool, iface_type, &n);
|
||||
|
||||
while (n--)
|
||||
@ -1537,6 +1540,7 @@ object_interface_check_properties (gpointer check_data,
|
||||
|
||||
g_free (pspecs);
|
||||
|
||||
out:
|
||||
g_type_class_unref (class);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user