multiselection tests: Plug a leak

g_list_model_get_item is transfer full.
This commit is contained in:
Matthias Clasen 2020-07-16 08:49:22 -04:00
parent f94f325636
commit ee96bc7185

View File

@ -29,8 +29,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 *