aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2003-03-11 19:07:01 +0000
committerJoel Brobecker <brobecker@gnat.com>2003-03-11 19:07:01 +0000
commit552f4abf837c2000ba59ea70e99d77b3e74354a7 (patch)
tree7a6db695eac5457eace177273d75ba0a0e0cd4df /gdb/breakpoint.c
parent088b2ddcabfaf33eca210ba96c02216126a6cadd (diff)
downloadgdb-552f4abf837c2000ba59ea70e99d77b3e74354a7.zip
gdb-552f4abf837c2000ba59ea70e99d77b3e74354a7.tar.gz
gdb-552f4abf837c2000ba59ea70e99d77b3e74354a7.tar.bz2
* breakpoint.c (bpstat_stop_status): Fix a small memory leak.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 638935c..1ff80d7 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -2763,9 +2763,9 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
/* We will stop here */
if (b->disposition == disp_disable)
b->enable_state = bp_disabled;
- bs->commands = copy_command_lines (b->commands);
if (b->silent)
bs->print = 0;
+ bs->commands = b->commands;
if (bs->commands &&
(STREQ ("silent", bs->commands->line) ||
(xdb_commands && STREQ ("Q", bs->commands->line))))
@@ -2773,6 +2773,7 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
bs->commands = bs->commands->next;
bs->print = 0;
}
+ bs->commands = copy_command_lines (bs->commands);
}
}
/* Print nothing for this entry if we dont stop or if we dont print. */