From 6ccbafd1db21ffab04edad04c0ce5545e37a655e Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Fri, 16 Jan 2026 11:57:08 +0800 Subject: [PATCH] [gnc-log-replay.cpp] don't need to strdup const char* thereby fixing leak. --- gnucash/import-export/log-replay/gnc-log-replay.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gnucash/import-export/log-replay/gnc-log-replay.cpp b/gnucash/import-export/log-replay/gnc-log-replay.cpp index 6685c59b0c..54a1341f92 100644 --- a/gnucash/import-export/log-replay/gnc-log-replay.cpp +++ b/gnucash/import-export/log-replay/gnc-log-replay.cpp @@ -549,14 +549,9 @@ void gnc_file_log_replay (GtkWindow *parent) FILE *log_file; const char * record_start_str = "===== START"; /* NOTE: This string must match src/engine/TransLog.c (sans newline) */ - const char * expected_header_orig = "mod\ttrans_guid\tsplit_guid\ttime_now\t" + const char * expected_header = "mod\ttrans_guid\tsplit_guid\ttime_now\t" "date_entered\tdate_posted\tacc_guid\tacc_name\tnum\tdescription\t" "notes\tmemo\taction\treconciled\tamount\tvalue\tdate_reconciled"; - static char *expected_header = NULL; - - /* Use g_strdup_printf so we don't get accidental tab -> space conversion */ - if (!expected_header) - expected_header = g_strdup(expected_header_orig); // qof_log_set_level(GNC_MOD_IMPORT, QOF_LOG_DEBUG); ENTER(" ");