[assistant-qif-import.c] fix gchar* leak

and text doesn't need to be strdup'd
This commit is contained in:
Christopher Lam
2024-09-27 23:07:20 +08:00
parent 654b6f7f0b
commit 4b0c3506a0

View File

@@ -3563,14 +3563,14 @@ gnc_ui_qif_import_summary_page_prepare (GtkAssistant *assistant,
gpointer user_data) gpointer user_data)
{ {
QIFImportWindow * wind = user_data; QIFImportWindow * wind = user_data;
gchar *text;
if (wind->load_stop) const gchar *msg = wind->load_stop ?
text = g_strdup_printf (_("There was a problem with the import.")); _("There was a problem with the import.") :
else _("QIF Import Completed.");
text = g_strdup_printf (_("QIF Import Completed."));
gtk_label_set_markup (GTK_LABEL(wind->summary_text), g_strdup_printf ("<span size=\"large\"><b>%s</b></span>", text)); gchar *text = g_markup_printf_escaped ("<span size=\"large\"><b>%s</b></span>", msg);
gtk_label_set_markup (GTK_LABEL(wind->summary_text), text);
g_free (text); g_free (text);