[gtk/matthiasc/for-master: 9/12] filter tests: Plug a leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 9/12] filter tests: Plug a leak
- Date: Thu, 16 Jul 2020 12:55:41 +0000 (UTC)
commit 6c1217dd93a4f3384aff67dd33308905562acf0a
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jul 16 08:48:36 2020 -0400
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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]