talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

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

plug leaks

Diffstat:
Msrc/prefs_themes.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git 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)