[gtk: 1/2] singleselection: Fix a memory leak



commit cfc44e09a0f990892873f91ea1af0c250cd26a67
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Sun Mar 22 10:42:01 2020 +0530

    singleselection: Fix a memory leak

 gtk/gtksingleselection.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtksingleselection.c b/gtk/gtksingleselection.c
index f2d0d47f1c..63db37d0de 100644
--- a/gtk/gtksingleselection.c
+++ b/gtk/gtksingleselection.c
@@ -240,8 +240,11 @@ gtk_single_selection_items_changed_cb (GListModel         *model,
                   g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]);
                   g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]);
                 }
+
+              g_object_unref (item);
               break;
             }
+          g_object_unref (item);
         }
       if (i == added)
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]