mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
Fix memory leak; unref type info we created, not field info
We expect callers to own the FieldInfo, we should not unref it. However we should unref the type info we accessed. svn path=/trunk/; revision=981
This commit is contained in:
parent
74e22b307c
commit
9c62e9fc6e
4
gfield.c
4
gfield.c
@ -197,7 +197,7 @@ g_field_info_get_field (GIFieldInfo *field_info,
|
||||
}
|
||||
}
|
||||
|
||||
g_base_info_unref ((GIBaseInfo *)field_info);
|
||||
g_base_info_unref ((GIBaseInfo *)type_info);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -389,7 +389,7 @@ g_field_info_set_field (GIFieldInfo *field_info,
|
||||
}
|
||||
}
|
||||
|
||||
g_base_info_unref ((GIBaseInfo *)field_info);
|
||||
g_base_info_unref ((GIBaseInfo *)type_info);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user