[Commits] [SCM] claws branch, master, updated. 4.1.1-105-g2ffed0163

paul at claws-mail.org paul at claws-mail.org
Thu Oct 26 08:51:30 UTC 2023


The branch, master has been updated
       via  2ffed01637e85f3751d9e3329eb6446a0861cbd0 (commit)
      from  2f166a77a0077ada79c3a906b07036212a6c3bc8 (commit)

Summary of changes:
 src/prefs_themes.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 2ffed01637e85f3751d9e3329eb6446a0861cbd0
Author: Paul <paul at claws-mail.org>
Date:   Thu Oct 26 09:51:25 2023 +0100

    plug leaks

diff --git a/src/prefs_themes.c b/src/prefs_themes.c
index 4f47e4a49..93eae1e4f 100644
--- a/src/prefs_themes.c
+++ b/src/prefs_themes.c
@@ -495,10 +495,13 @@ static void prefs_themes_btn_remove_clicked_cb(GtkWidget *widget, gpointer data)
 	gchar      *theme_str;
 	gchar      *alert_title = NULL;
 	AlertValue  val = 0;
+	gchar      *tmp = NULL;
 
 	theme_str = tdata->displayed;
 
-	alert_title = g_strdup_printf(_("Remove theme '%s'"), g_path_get_basename(theme_str));
+	tmp = g_path_get_basename(theme_str);
+	alert_title = g_strdup_printf(_("Remove theme '%s'"), tmp);
+	g_free(tmp);
 
 	val = alertpanel(alert_title,
 			 _("Are you sure you want to remove this theme?"),
@@ -559,10 +562,8 @@ static void prefs_themes_btn_install_clicked_cb(GtkWidget *widget, gpointer data
 				 _("This folder doesn't seem to be a theme"
 				   "folder.\nInstall anyway?"),
 				 NULL, _("_No"), NULL, _("_Yes"), NULL, NULL, ALERTFOCUS_FIRST);
-		if (G_ALERTALTERNATE != val) {
-			g_free(alert_title);
+		if (G_ALERTALTERNATE != val)
 			goto end_inst;
-		}
 	}
 
 	cinfo->dest = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
@@ -618,6 +619,7 @@ end_inst:
 	g_free(themeinfo);
 	g_free(cinfo);
 	g_free(themename);
+	g_free(alert_title);
 }
 
 static gboolean prefs_themes_viewall_key_pressed(GtkWidget *keywidget, GdkEventKey *event, GtkWidget **widget)

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list