From 6c1217dd93a4f3384aff67dd33308905562acf0a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 16 Jul 2020 08:48:36 -0400 Subject: [PATCH] filter tests: Plug a leak g_list_model_get_item is transfer full. --- testsuite/gtk/filter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testsuite/gtk/filter.c b/testsuite/gtk/filter.c index 5c5fd707c7..2e88a21f7a 100644 --- a/testsuite/gtk/filter.c +++ b/testsuite/gtk/filter.c @@ -28,8 +28,11 @@ get (GListModel *model, guint position) { GObject *object = g_list_model_get_item (model, position); + guint ret; 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 *