summaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorAndrew Stubbs <andrew.stubbs@st.com>2006-06-21 10:49:16 +0000
committerAndrew Stubbs <andrew.stubbs@st.com>2006-06-21 10:49:16 +0000
commit1a3120d7eac289a93e3e0a3f476661186b816f65 (patch)
tree0b2e8ca75aeebc915d6ae82145cadf61a92dca9d /gdb/cli
parentb8a2d360fad3885b206bdb6c8a460f1a51d61fc8 (diff)
downloadgdb-1a3120d7eac289a93e3e0a3f476661186b816f65.tar.gz
2006-06-21 Andrew Stubbs <andrew.stubbs@st.com>
* cli/cli-script.c (realloc_body_list): Zero new parts of body_list.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-script.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 4f444771520..643eb74933a 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -701,6 +701,7 @@ realloc_body_list (struct command_line *command, int new_length)
xmalloc (sizeof (struct command_line *) * new_length);
memcpy (body_list, command->body_list, sizeof (struct command_line *) * n);
+ memset (body_list + n, 0, sizeof (struct command_line *) * (new_length - n));
xfree (command->body_list);
command->body_list = body_list;