[gtk/wip/sadiq/model-fixes] treelistmodel: Fix memory leak
- From: Mohammed Sadiq <pksadiq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/sadiq/model-fixes] treelistmodel: Fix memory leak
- Date: Tue, 18 Sep 2018 02:23:12 +0000 (UTC)
commit f211d71f747489c6b63ab804ea2c12ad4d625999
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Tue Sep 18 07:28:56 2018 +0530
treelistmodel: Fix memory leak
gtk_tree_list_model_init_node() increases the reference count
of the model passed. Let's not do that, and let it take the
model passed.
gtk/gtktreelistmodel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c
index a7f6619d82..a612057d96 100644
--- a/gtk/gtktreelistmodel.c
+++ b/gtk/gtktreelistmodel.c
@@ -494,7 +494,7 @@ gtk_tree_list_model_init_node (GtkTreeListModel *list,
gsize i, n;
TreeNode *node;
- self->model = g_object_ref (model);
+ self->model = model;
g_signal_connect (model,
"items-changed",
G_CALLBACK (gtk_tree_list_model_items_changed_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]