[gtk/matthiasc/for-master: 11/12] multiselection tests: Plug a leak



commit ee96bc71855642b3f9090cfc2345513010321637
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jul 16 08:49:22 2020 -0400

    multiselection tests: Plug a leak
    
    g_list_model_get_item is transfer full.

 testsuite/gtk/multiselection.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/testsuite/gtk/multiselection.c b/testsuite/gtk/multiselection.c
index 970a6c4a6a..7d67f3ca3d 100644
--- a/testsuite/gtk/multiselection.c
+++ b/testsuite/gtk/multiselection.c
@@ -29,8 +29,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]