[Commits] [SCM] claws branch, master, updated. 3.18.0-219-ga102ba8a3
wwp at claws-mail.org
wwp at claws-mail.org
Thu Sep 30 12:28:53 CEST 2021
The branch, master has been updated
via a102ba8a33d274aac3ebba966007c646fb14a8a1 (commit)
from e389d0d172652d1702a05a058165756253635237 (commit)
Summary of changes:
src/gtk/about.c | 17 +++++++++++------
src/gtk/gtkaspell.c | 9 +++++----
2 files changed, 16 insertions(+), 10 deletions(-)
- Log -----------------------------------------------------------------
commit a102ba8a33d274aac3ebba966007c646fb14a8a1
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 292ebbea1..469d0c257 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 a7384a9fb..ef632f445 100644
--- a/src/gtk/gtkaspell.c
+++ b/src/gtk/gtkaspell.c
@@ -1432,7 +1432,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;
@@ -1463,9 +1463,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_stock(GTK_STOCK_DIALOG_QUESTION,
GTK_ICON_SIZE_DIALOG);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list