[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-97-g2290daff1
mones at claws-mail.org
mones at claws-mail.org
Sun Jun 9 09:42:22 UTC 2024
The branch, gtk2 has been updated
via 2290daff1cb520ffe6d867bc45aa00dd8450530b (commit)
from f979195d96ffde1667ac51e0bf0e5c665bba0e58 (commit)
Summary of changes:
src/plugins/libravatar/libravatar_prefs.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 2290daff1cb520ffe6d867bc45aa00dd8450530b
Author: Ricardo Mones <ricardo at mones.org>
Date: Sun Jun 9 11:41:03 2024 +0200
Fix CID 1591826: Resource leak
diff --git a/src/plugins/libravatar/libravatar_prefs.c b/src/plugins/libravatar/libravatar_prefs.c
index aa2e5121c..4b75dc59d 100644
--- a/src/plugins/libravatar/libravatar_prefs.c
+++ b/src/plugins/libravatar/libravatar_prefs.c
@@ -142,18 +142,22 @@ static GtkWidget *labeled_spinner_box(gchar *label, GtkWidget *spinner, gchar *u
static gchar *avatar_stats_label_markup(AvatarCacheStats *stats)
{
if (stats == NULL)
- return g_strdup(g_strconcat("<span color=\"red\">",
- _("Error reading cache stats"), "</span>", NULL));
+ return g_markup_printf_escaped("<span color=\"red\">%s</span>",
+ _("Error reading cache stats"));
- if (stats->errors > 0)
- return g_markup_printf_escaped(g_strconcat("<span color=\"red\">",
- _("Using %s in %d files, %d "
- "directories, %d others and %d errors"), "</span>", NULL),
+ if (stats->errors > 0) {
+ gchar *label_text = g_strdup_printf(_("Using %s in %d files, %d "
+ "directories, %d others and %d errors"),
to_human_readable((goffset) stats->bytes),
stats->files,
stats->dirs,
stats->others,
stats->errors);
+ gchar *label = g_markup_printf_escaped("<span color=\"red\">%s</span>",
+ label_text);
+ g_free(label_text);
+ return label;
+ }
return g_strdup_printf(
_("Using %s in %d files, %d directories and %d others"),
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list