mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-25 19:37:52 +02: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:
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user