From 62c018fe4a6de89d710e84b7efffe2462fa435cd Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 16 Oct 2007 11:55:17 +0000 Subject: [PATCH] * mi/mi-main.c (captured_mi_execute_command): Clear mi_error_message after freeing it. --- gdb/ChangeLog | 5 +++++ gdb/mi/mi-main.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7d0fddf4692..b13e70b0cb8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-10-16 Daniel Jacobowitz + + * mi/mi-main.c (captured_mi_execute_command): Clear mi_error_message + after freeing it. + 2007-10-16 Kevin Buettner * m32r-tdep.c (decode_prologue): Sign extend offset for diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 93e28bf5049..5c9d63dd17c 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -1161,6 +1161,7 @@ captured_mi_execute_command (struct ui_out *uiout, void *data) fputs_unfiltered ("^error,msg=\"", raw_stdout); fputstr_unfiltered (mi_error_message, '"', raw_stdout); xfree (mi_error_message); + mi_error_message = NULL; fputs_unfiltered ("\"\n", raw_stdout); } mi_out_rewind (uiout); @@ -1213,6 +1214,7 @@ captured_mi_execute_command (struct ui_out *uiout, void *data) fputs_unfiltered ("^error,msg=\"", raw_stdout); fputstr_unfiltered (mi_error_message, '"', raw_stdout); xfree (mi_error_message); + mi_error_message = NULL; fputs_unfiltered ("\"\n", raw_stdout); } mi_out_rewind (uiout); -- 2.30.2