forked from AuroraMiddleware/gtk
filter tests: Plug a leak
g_list_model_get_item is transfer full.
This commit is contained in:
parent
edb792503b
commit
6c1217dd93
@ -28,8 +28,11 @@ get (GListModel *model,
|
|||||||
guint position)
|
guint position)
|
||||||
{
|
{
|
||||||
GObject *object = g_list_model_get_item (model, position);
|
GObject *object = g_list_model_get_item (model, position);
|
||||||
|
guint ret;
|
||||||
g_assert (object != NULL);
|
g_assert (object != NULL);
|
||||||
return GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
ret = GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||||
|
g_object_unref (object);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
Loading…
Reference in New Issue
Block a user