[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-60-g77b6245dc
paul at claws-mail.org
paul at claws-mail.org
Tue Feb 20 09:37:24 CET 2024
The branch, gtk2 has been updated
via 77b6245dccbaf8bcb915af0b4efcc15b95d3785c (commit)
from 903d160d1726bc749b6fe3f82f5484b65701f50c (commit)
Summary of changes:
src/addressadd.c | 6 +++---
src/browseldap.c | 6 +++---
src/grouplistdialog.c | 6 +++---
src/gtk/foldersort.c | 8 ++++----
src/mainwindow.c | 7 +++----
src/messageview.c | 6 +++---
src/plugins/att_remover/att_remover.c | 9 ++++-----
src/plugins/pdf_viewer/poppler_viewer.c | 6 +++---
src/plugins/smime/smime.c | 6 +++---
src/sourcewindow.c | 4 ++--
src/summaryview.c | 4 ++--
11 files changed, 33 insertions(+), 35 deletions(-)
- Log -----------------------------------------------------------------
commit 77b6245dccbaf8bcb915af0b4efcc15b95d3785c
Author: Paul <paul at claws-mail.org>
Date: Tue Feb 20 08:31:03 2024 +0000
fix several USE_AFTER_FREE coverity bugs
CIDs 1491105, 1491164, 1491139, 1491166, 1491168, 1491169, 1491178, 1491232, 1491242, 1492281
diff --git a/src/addressadd.c b/src/addressadd.c
index deb6c4553..07d7e62ac 100644
--- a/src/addressadd.c
+++ b/src/addressadd.c
@@ -1,6 +1,6 @@
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2001-2012 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2001-2024 the Claws Mail team and Match Grun
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -266,8 +266,8 @@ static void addressadd_create( void ) {
GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
tree_folder = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
- g_object_unref(store);
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), ADDRADD_COL_NAME, GTK_SORT_ASCENDING);
+ g_object_unref(store);
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tree_folder), prefs_common.use_stripes_everywhere);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_folder), TRUE);
gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(tree_folder), FALSE);
diff --git a/src/browseldap.c b/src/browseldap.c
index 2a539d361..25623f303 100644
--- a/src/browseldap.c
+++ b/src/browseldap.c
@@ -1,6 +1,6 @@
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2012 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2003-2024 the Claws Mail team and Match Grun
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -274,7 +274,6 @@ static void browse_create( void ) {
-1);
view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
- g_object_unref(store);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE);
gtk_tree_view_set_reorderable(GTK_TREE_VIEW(view), FALSE);
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
@@ -294,6 +293,7 @@ static void browse_create( void ) {
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store),
COL_NAME, GTK_SORT_ASCENDING);
+ g_object_unref(store);
gtk_container_add( GTK_CONTAINER(tree_win), view );
diff --git a/src/grouplistdialog.c b/src/grouplistdialog.c
index 6d854dc81..4c46b5583 100644
--- a/src/grouplistdialog.c
+++ b/src/grouplistdialog.c
@@ -1,6 +1,6 @@
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -590,8 +590,8 @@ static gboolean button_press_cb(GtkCMCTree *ctree, GdkEventButton *button,
list = g_slist_find_custom(subscribed, ginfo->name,
(GCompareFunc)g_ascii_strcasecmp);
if (list) {
- g_free(list->data);
subscribed = g_slist_remove(subscribed, list->data);
+ g_free(list->data);
gtk_cmclist_unselect_row(GTK_CMCLIST(ctree), row, 0);
} else {
subscribed = g_slist_append(subscribed, g_strdup(ginfo->name));
diff --git a/src/gtk/foldersort.c b/src/gtk/foldersort.c
index 7238684b9..733456aec 100644
--- a/src/gtk/foldersort.c
+++ b/src/gtk/foldersort.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004-2018 the Claws Mail Team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2004-2024 the Claws Mail Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -301,7 +301,7 @@ void foldersort_open()
/* Create the view widget */
folderlist = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
- g_object_unref(store);
+
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(folderlist), TRUE);
gtk_tree_view_set_reorderable(GTK_TREE_VIEW(folderlist), TRUE);
selector = gtk_tree_view_get_selection(GTK_TREE_VIEW(folderlist));
@@ -390,6 +390,6 @@ void foldersort_open()
gtk_tree_selection_select_iter(selector, &iter);
set_selected(dialog);
}
-
+ g_object_unref(store);
inc_lock();
}
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 80a86b826..1064893bd 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2023 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -3895,10 +3895,9 @@ void main_window_destroy_all(void)
mainwin->summaryview->mainwin = NULL;
mainwin->messageview->mainwin = NULL;
- g_free(mainwin->toolbar);
- g_free(mainwin);
-
+ g_free(mainwin->toolbar);
mainwin_list = g_list_remove(mainwin_list, mainwin);
+ g_free(mainwin);
}
g_list_free(mainwin_list);
mainwin_list = NULL;
diff --git a/src/messageview.c b/src/messageview.c
index 8137bd6c8..3b2405751 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2021 the Claws Mail team and Hiroyuki Yamamoto
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -2733,8 +2733,8 @@ static void view_source_cb(GtkAction *action, gpointer data)
if (!messageview->msginfo) return;
srcwin = source_window_create();
- source_window_show_msg(srcwin, messageview->msginfo);
source_window_show(srcwin);
+ source_window_show_msg(srcwin, messageview->msginfo);
}
static void show_all_header_cb(GtkToggleAction *action, gpointer data)
diff --git a/src/plugins/att_remover/att_remover.c b/src/plugins/att_remover/att_remover.c
index d454f5a9d..28ed41efd 100644
--- a/src/plugins/att_remover/att_remover.c
+++ b/src/plugins/att_remover/att_remover.c
@@ -1,10 +1,9 @@
/*
* att_remover -- for Claws Mail
+ * Copyright (C) 2005-2024 the Claws Mail Team and Colin Leroy
*
- * Copyright (C) 2005 Colin Leroy <colin at colino.net>
- *
- * Sylpheed is a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2005 Hiroyuki Yamamoto and the Claws Mail Team
+ * Claws Mail is a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 the Claws Mail Team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -353,11 +352,11 @@ static void remove_attachments_dialog(AttRemover *attremover)
G_TYPE_BOOLEAN,
-1));
list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(model));
- g_object_unref(model);
gtk_tree_view_set_rules_hint(list_view, prefs_common_get_prefs()->use_stripes_everywhere);
renderer = gtk_cell_renderer_toggle_new();
g_signal_connect(renderer, "toggled", G_CALLBACK(remove_toggled_cb), model);
+ g_object_unref(model);
column = gtk_tree_view_column_new_with_attributes
(_("Remove"),
renderer,
diff --git a/src/plugins/pdf_viewer/poppler_viewer.c b/src/plugins/pdf_viewer/poppler_viewer.c
index cb56b150b..93e6595f2 100644
--- a/src/plugins/pdf_viewer/poppler_viewer.c
+++ b/src/plugins/pdf_viewer/poppler_viewer.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2021 the Claws Mail Team and Salvatore De Paolis
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 the Claws Mail Team and Salvatore De Paolis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1845,7 +1845,6 @@ static MimeViewer *pdf_viewer_create(void)
G_TYPE_DOUBLE);
viewer->index_list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(tree_store));
- g_object_unref(tree_store);
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(_("Name"), renderer, "text", 0, NULL);
@@ -1853,6 +1852,7 @@ static MimeViewer *pdf_viewer_create(void)
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(viewer->index_list), FALSE);
viewer->index_model = GTK_TREE_MODEL(tree_store);
+ g_object_unref(tree_store);
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(viewer->index_list)),
GTK_SELECTION_SINGLE);
diff --git a/src/plugins/smime/smime.c b/src/plugins/smime/smime.c
index a56cc2206..d4262daaa 100644
--- a/src/plugins/smime/smime.c
+++ b/src/plugins/smime/smime.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2021 Colin Leroy and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 the Claws Mail team and Colin Leroy
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1009,7 +1009,7 @@ gboolean smime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
claws_fclose(fp);
claws_unlink(tmpfile);
}
- if (claws_safe_fclose(fp) == EOF) {
+ if (fp != NULL && claws_safe_fclose(fp) == EOF) {
FILE_OP_ERROR(tmpfile, "claws_fclose");
claws_unlink(tmpfile);
g_free(tmpfile);
diff --git a/src/sourcewindow.c b/src/sourcewindow.c
index a9a1ae08c..6600a1781 100644
--- a/src/sourcewindow.c
+++ b/src/sourcewindow.c
@@ -1,6 +1,6 @@
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/summaryview.c b/src/summaryview.c
index 4072df935..ad0f81bef 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2023 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -3864,8 +3864,8 @@ void summary_view_source(SummaryView * summaryview)
srcwin = source_window_create();
msginfo = gtk_cmctree_node_get_row_data(ctree, summaryview->selected);
- source_window_show_msg(srcwin, msginfo);
source_window_show(srcwin);
+ source_window_show_msg(srcwin, msginfo);
}
void summary_reedit(SummaryView *summaryview)
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list