[Commits] [SCM] claws branch, master, updated. 4.2.0-113-gf21505305
mones at claws-mail.org
mones at claws-mail.org
Sun Jun 9 09:42:22 UTC 2024
The branch, master has been updated
via f21505305f6054677f80c18c7bd813623b947b29 (commit)
from 2dff9610ae15d24b734205e37578d2350368207a (commit)
Summary of changes:
src/plugins/libravatar/libravatar_prefs.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit f21505305f6054677f80c18c7bd813623b947b29
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 45c839d1c..c841bee25 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