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 9934321..aa4d217 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_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"
                        _("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);
        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);