mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
gparamspecs: Fix type class leaks on error handling paths
Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1911
This commit is contained in:
parent
1bebba0430
commit
1a3bba4670
@ -2092,7 +2092,10 @@ g_param_spec_enum (const gchar *name,
|
||||
blurb,
|
||||
flags);
|
||||
if (espec == NULL)
|
||||
return NULL;
|
||||
{
|
||||
g_type_class_unref (enum_class);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
espec->enum_class = enum_class;
|
||||
espec->default_value = default_value;
|
||||
@ -2140,7 +2143,10 @@ g_param_spec_flags (const gchar *name,
|
||||
blurb,
|
||||
flags);
|
||||
if (fspec == NULL)
|
||||
return NULL;
|
||||
{
|
||||
g_type_class_unref (flags_class);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fspec->flags_class = flags_class;
|
||||
fspec->default_value = default_value;
|
||||
|
Loading…
Reference in New Issue
Block a user