From d4bd60059614cbe980bef100476fa8d044ee805d Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 9 Sep 2021 15:58:19 -0700 Subject: [PATCH] Fix free-of-unallocated-address crash due to uninitialized ptr. --- gnucash/gnome/gnc-plugin-report-system.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnucash/gnome/gnc-plugin-report-system.c b/gnucash/gnome/gnc-plugin-report-system.c index 3016f99373..621f001317 100644 --- a/gnucash/gnome/gnc-plugin-report-system.c +++ b/gnucash/gnome/gnc-plugin-report-system.c @@ -136,10 +136,10 @@ gnc_report_system_file_stream_cb (const char *location, char ** data, int *len) static gboolean gnc_report_system_report_stream_cb (const char *location, char ** data, int *len) { - gboolean ok; - gchar *captured_str; - - ok = gnc_run_report_id_string_with_error_handling (location, data, &captured_str); + gchar *captured_str = NULL; + gboolean ok = + gnc_run_report_id_string_with_error_handling (location, data, + &captured_str); if (!ok) {