aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <gabriel@krisman.be>2015-04-19 19:34:08 -0300
committerGabriel Krisman Bertazi <gabriel@krisman.be>2015-04-19 20:07:33 -0300
commite31d7699a0b116025b48f1ab5214eddd2e56ef9f (patch)
tree024ba564df1efd7790e6d4b3c6f8308c529a8db5 /gdb/breakpoint.c
parent110f91128cf3e047eb1e04d346c27d71cc33fb9c (diff)
downloadgdb-e31d7699a0b116025b48f1ab5214eddd2e56ef9f.zip
gdb-e31d7699a0b116025b48f1ab5214eddd2e56ef9f.tar.gz
gdb-e31d7699a0b116025b48f1ab5214eddd2e56ef9f.tar.bz2
Remove duplicated xmalloc in update_dprintf_command_list
Code in update_dprintf_command_list performed a duplicated memory allocation which caused an obvious memory leak. This removes the duplication. gdb/ 2015-04-19 Gabriel Krisman Bertazi <gabriel@krisman.be> * breakpoint.c (update_dprintf_command_list): Remove duplicated xmalloc.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 31869f1..a3531a0 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -9057,7 +9057,6 @@ update_dprintf_command_list (struct breakpoint *b)
struct command_line *printf_cmd_line
= xmalloc (sizeof (struct command_line));
- printf_cmd_line = xmalloc (sizeof (struct command_line));
printf_cmd_line->control_type = simple_control;
printf_cmd_line->body_count = 0;
printf_cmd_line->body_list = NULL;