Skip to content

Commit

Permalink
[assistant-qif-import.c] fix gchar* leak
Browse files Browse the repository at this point in the history
and text doesn't need to be strdup'd
  • Loading branch information
christopherlam committed Sep 29, 2024
1 parent 654b6f7 commit 4b0c350
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gnucash/import-export/qif-imp/assistant-qif-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -3563,14 +3563,14 @@ gnc_ui_qif_import_summary_page_prepare (GtkAssistant *assistant,
gpointer user_data)
{
QIFImportWindow * wind = user_data;
gchar *text;

if (wind->load_stop)
text = g_strdup_printf (_("There was a problem with the import."));
else
text = g_strdup_printf (_("QIF Import Completed."));
const gchar *msg = wind->load_stop ?
_("There was a problem with the import.") :
_("QIF Import Completed.");

gchar *text = g_markup_printf_escaped ("<span size=\"large\"><b>%s</b></span>", msg);

gtk_label_set_markup (GTK_LABEL(wind->summary_text), g_strdup_printf ("<span size=\"large\"><b>%s</b></span>", text));
gtk_label_set_markup (GTK_LABEL(wind->summary_text), text);

g_free (text);

Expand Down

0 comments on commit 4b0c350

Please sign in to comment.