Fix a memory leak in the "no imap" account prefs label.
authorAndrej Kacian <ticho@claws-mail.org>
Mon, 10 Jul 2017 16:01:41 +0000 (18:01 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Mon, 10 Jul 2017 16:01:41 +0000 (18:01 +0200)
src/prefs_account.c

index 99343219e2bd0597d53f7e69869a5e052b2fcecd..aa4d21785f9d7466a2100bf324b2c89c91cb38d4 100644 (file)
@@ -1145,9 +1145,11 @@ static void basic_create_widget_func(PrefsPage * _page,
 
        no_imap_warn_icon = gtk_image_new_from_stock
                         (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_SMALL_TOOLBAR);
-       no_imap_warn_label = gtk_label_new(g_strconcat("<span weight=\"bold\">",
+       buf = g_strconcat("<span weight=\"bold\">",
                        _("Warning: this version of Claws Mail\n"
-                         "has been built without IMAP and News support."), "</span>", NULL));
+                         "has been built without IMAP and News support."), "</span>", NULL);
+       no_imap_warn_label = gtk_label_new(buf);
+       g_free(buf);
        gtk_label_set_use_markup(GTK_LABEL(no_imap_warn_label), TRUE);
 
        gtk_box_pack_start(GTK_BOX (optmenubox), no_imap_warn_icon, FALSE, FALSE, 0);