[Commits] [SCM] claws branch, master, updated. 4.3.0-37-g4f20d4732

colin at claws-mail.org colin at claws-mail.org
Wed Aug 28 15:25:08 UTC 2024


The branch, master has been updated
       via  4f20d4732b11d49d3ef18e7bda4647bd5e9aead8 (commit)
      from  93e856cf6e569681ad4c65808d3a136589330cab (commit)

Summary of changes:
 src/addrcustomattr.c | 2 +-
 src/edittags.c       | 2 +-
 src/news_gtk.c       | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 4f20d4732b11d49d3ef18e7bda4647bd5e9aead8
Author: Colin Leroy-Mira <colin at colino.net>
Date:   Wed Aug 28 17:24:58 2024 +0200

    Small memory issues fixes

diff --git a/src/addrcustomattr.c b/src/addrcustomattr.c
index 7a4d9d513..20aee1ac8 100644
--- a/src/addrcustomattr.c
+++ b/src/addrcustomattr.c
@@ -272,9 +272,9 @@ static GtkWidget *custom_attr_window_list_view_create	(void)
 
 	model = GTK_TREE_MODEL(custom_attr_window_create_data_store());
 	list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(model));
-	g_object_unref(model);	
 	gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model),
 			CUSTOM_ATTR_NAME, GTK_SORT_ASCENDING);
+	g_object_unref(model);
 
 	selector = gtk_tree_view_get_selection(list_view);
 	gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE);
diff --git a/src/edittags.c b/src/edittags.c
index 9ee64b5e1..8a47bf873 100644
--- a/src/edittags.c
+++ b/src/edittags.c
@@ -358,8 +358,8 @@ static GtkWidget *tags_window_list_view_create	(void)
 
 	model = GTK_TREE_MODEL(tags_window_create_data_store());
 	list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(model));
-	g_object_unref(model);	
 	gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), TAG_NAME, GTK_SORT_ASCENDING);
+	g_object_unref(model);
 
 	selector = gtk_tree_view_get_selection(list_view);
 	gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE);
diff --git a/src/news_gtk.c b/src/news_gtk.c
index 309c39dca..0da8664eb 100644
--- a/src/news_gtk.c
+++ b/src/news_gtk.c
@@ -252,9 +252,9 @@ static void unsubscribe_newsgroup_cb(GtkAction *action, gpointer data)
 		 	         NULL, _("_Cancel"), NULL, _("_Unsubscribe"), NULL, NULL,
 				ALERTFOCUS_FIRST, FALSE, NULL, ALERT_WARNING);
 	g_free(message);
-	g_free(name);
 	if (avalue != G_ALERTALTERNATE) {
 		g_free(old_id);
+		g_free(name);
 		return;
     }
 
@@ -267,8 +267,10 @@ static void unsubscribe_newsgroup_cb(GtkAction *action, gpointer data)
 		folder_item_scan(item);
 		alertpanel_error(_("Can't remove the folder '%s'."), name);
 		g_free(old_id);
+		g_free(name);
 		return;
 	}
+	g_free(name);
 	
 	folder_write_list();
 	

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list