[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-277-g399a77d88

wwp at claws-mail.org wwp at claws-mail.org
Thu Sep 30 12:28:57 CEST 2021


The branch, gtk3 has been updated
       via  399a77d8813bedb483b3ca9238d455a9dc82b7f9 (commit)
      from  4e0408e032d99c48f34c89d110204eec2aff9f83 (commit)

Summary of changes:
 src/gtk/about.c     | 17 +++++++++++------
 src/gtk/gtkaspell.c |  9 +++++----
 2 files changed, 16 insertions(+), 10 deletions(-)


- Log -----------------------------------------------------------------
commit 399a77d8813bedb483b3ca9238d455a9dc82b7f9
Author: wwp <subscript at free.fr>
Date:   Thu Sep 30 12:28:09 2021 +0200

    Fix CID 1491099 and 1491241: resource leaks.

diff --git a/src/gtk/about.c b/src/gtk/about.c
index c1e0e88a0..2b68422b4 100644
--- a/src/gtk/about.c
+++ b/src/gtk/about.c
@@ -99,6 +99,7 @@ static GtkWidget *about_create_child_page_info(void)
 #if HAVE_SYS_UTSNAME_H
 	struct utsname utsbuf;
 #endif
+	gchar *format;
 
 	scrolledwin = gtk_scrolled_window_new(NULL, NULL);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
@@ -169,32 +170,36 @@ static GtkWidget *about_create_child_page_info(void)
 
 #if HAVE_SYS_UTSNAME_H
 	uname(&utsbuf);
-	g_snprintf(buf, sizeof(buf),g_strconcat(
+	format = g_strconcat(
 		       "GTK+ %d.%d.%d / GLib %d.%d.%d\n",
 		     _("Locale: %s (charset: %s)\n"
-		     "Operating System: %s %s (%s)"), NULL),
+		     "Operating System: %s %s (%s)"), NULL);
+	g_snprintf(buf, sizeof(buf), format,
 		   gtk_major_version, gtk_minor_version, gtk_micro_version,
 		   glib_major_version, glib_minor_version, glib_micro_version,
 		   conv_get_current_locale(), conv_get_locale_charset_str(),
 		   utsbuf.sysname, utsbuf.release, utsbuf.machine);
 #elif defined(G_OS_WIN32)
-	g_snprintf(buf, sizeof(buf),g_strconcat(
+	format = g_strconcat(
 		       "GTK+ %d.%d.%d / GLib %d.%d.%d\n",
 		     _("Locale: %s (charset: %s)\n"
-		     "Operating System: %s"), NULL),
+		     "Operating System: %s"), NULL);
+	g_snprintf(buf, sizeof(buf), format,
 		   gtk_major_version, gtk_minor_version, gtk_micro_version,
 		   glib_major_version, glib_minor_version, glib_micro_version,
 		   conv_get_current_locale(), conv_get_locale_charset_str(),
 		   "Win32");
 #else
-	g_snprintf(buf, sizeof(buf),g_strconcat(
+	format = g_strconcat(
 		       "GTK+ %d.%d.%d / GLib %d.%d.%d\n",
 		     _("Locale: %s (charset: %s)\n"
-		     "Operating System: unknown"), NULL),
+		     "Operating System: unknown"), NULL);
+	g_snprintf(buf, sizeof(buf), format,
 		   gtk_major_version, gtk_minor_version, gtk_micro_version,
 		   glib_major_version, glib_minor_version, glib_micro_version,
 		   conv_get_current_locale(), conv_get_locale_charset_str());
 #endif
+	g_free(format);
 
 	gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, buf, -1,
 						 "indented-list-item", NULL);
diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c
index cf94cde57..41ff738c7 100644
--- a/src/gtk/gtkaspell.c
+++ b/src/gtk/gtkaspell.c
@@ -1426,7 +1426,7 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data)
 	GtkWidget *parent_window;
 	GtkWidget *content_area;
 	GtkWidget *action_area;
-	gchar *utf8buf, *thelabel;
+	gchar *utf8buf, *thelabel, *format;
 	gint xx, yy;
 	GtkAspell *gtkaspell = (GtkAspell *) data;
 
@@ -1457,9 +1457,10 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data)
 
 	utf8buf  = g_strdup(gtkaspell->theword);
 
-	thelabel = g_strdup_printf(g_strconcat("<span weight=\"bold\" size=\"larger\">",
-					_("Replace \"%s\" with: "), "</span>", NULL),
-				   utf8buf);
+	format = g_strconcat("<span weight=\"bold\" size=\"larger\">",
+					_("Replace \"%s\" with: "), "</span>", NULL);
+	thelabel = g_strdup_printf(format, utf8buf);
+	g_free(format);
 	
 	icon = gtk_image_new_from_icon_name("dialog-question",
 					GTK_ICON_SIZE_DIALOG);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list