mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Avoid _get_func() consuming reference from input info
Fix of leak in 4c9424e18d71237f438a99bc5f2d45ae7de60b78 was a bit overaggressive, stealing also one reference from input 'info' argument. Also fixes another bug in that commit - local 'func' shadowing the return value, causing that function always returned NULL even when some result was actually found. https://bugzilla.gnome.org/show_bug.cgi?id=673282
This commit is contained in:
parent
5374f24d38
commit
d0b8813d14
@ -819,7 +819,7 @@ _get_func(GIObjectInfo *info,
|
||||
GIObjectInfo *parent_info;
|
||||
gpointer func = NULL;
|
||||
|
||||
parent_info = info;
|
||||
parent_info = g_base_info_ref (info);
|
||||
while (parent_info != NULL)
|
||||
{
|
||||
parents = g_slist_prepend (parents, parent_info);
|
||||
@ -828,7 +828,6 @@ _get_func(GIObjectInfo *info,
|
||||
|
||||
for (l = parents; l; l = l->next)
|
||||
{
|
||||
GIObjectInfoRefFunction func;
|
||||
parent_info = l->data;
|
||||
symbol = getter (parent_info);
|
||||
if (symbol == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user