]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* breakpoint.c (break_command_1): Always free err_msg before
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 4 Jan 2005 13:31:46 +0000 (13:31 +0000)
committerAndreas Schwab <schwab@linux-m68k.org>
Tue, 4 Jan 2005 13:31:46 +0000 (13:31 +0000)
returning when an exception was caught.

gdb/ChangeLog
gdb/breakpoint.c

index beddd4a5fe0d01ecd4f7af27868fc2450c371d38..5c483c0efa140a3a81f300b8d0f3e99b30840614 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-04  Andreas Schwab  <schwab@suse.de>
+
+       * breakpoint.c (break_command_1): Always free err_msg before
+       returning when an exception was caught.
+
 2005-01-01  Joel Brobecker  <brobecker@gnat.com>
 
         * hppa-tdep.c (prologue_inst_adjust_sp): Fix small confusion
index 5774920374912f484c0a197ae59dd162f31c1e33..20134e579d0ae710034adf3f88587aa6edd54134 100644 (file)
@@ -5141,7 +5141,10 @@ break_command_1 (char *arg, int flag, int from_tty, struct breakpoint *pending_b
        {
          /* If called to resolve pending breakpoint, just return error code.  */
          if (pending_bp)
-           return rc;
+           {
+             xfree (err_msg);
+             return rc;
+           }
 
          error_output_message (NULL, err_msg);
          xfree (err_msg);
@@ -5169,7 +5172,10 @@ break_command_1 (char *arg, int flag, int from_tty, struct breakpoint *pending_b
          pending = 1;
        }
       else
-       return rc;
+       {
+         xfree (err_msg);
+         return rc;
+       }
     }
   else if (!sals.nelts)
     return GDB_RC_FAIL;