* mi/mi-main.c (captured_mi_execute_command): Clear mi_error_message
authorDaniel Jacobowitz <drow@false.org>
Tue, 16 Oct 2007 11:55:17 +0000 (11:55 +0000)
committerDaniel Jacobowitz <drow@false.org>
Tue, 16 Oct 2007 11:55:17 +0000 (11:55 +0000)
after freeing it.

gdb/ChangeLog
gdb/mi/mi-main.c

index 7d0fddf4692a3fa6459b7337ada97f78e052636d..b13e70b0cb8f3e42f6cf7ebc01338b2e3a1e8a64 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-16  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * mi/mi-main.c (captured_mi_execute_command): Clear mi_error_message
+       after freeing it.
+
 2007-10-16  Kevin Buettner  <kevinb@redhat.com>
 
        * m32r-tdep.c (decode_prologue): Sign extend offset for
index 93e28bf50495f0241b4a2635e84a2e336430f8bc..5c9d63dd17c679f7d926c1a349dcc19653899672 100644 (file)
@@ -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);