aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-01 23:07:40 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-01 23:07:40 +0000
commitdc19db01c117e015c4656cfb4aa78bb9acaf8ba8 (patch)
treee737eacb03216e72a5d1623bba38d680e9df60f4
parent75c362b84ef8a7ff5dd360ea6a377c5d731b899a (diff)
downloadgdb-dc19db01c117e015c4656cfb4aa78bb9acaf8ba8.zip
gdb-dc19db01c117e015c4656cfb4aa78bb9acaf8ba8.tar.gz
gdb-dc19db01c117e015c4656cfb4aa78bb9acaf8ba8.tar.bz2
2011-03-01 Michael Snyder <msnyder@vmware.com>
* ada-lang.c (ada_make_symbol_completion_list): Replace malloc with xmalloc.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/ada-lang.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5be6dea..9259a5e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2011-03-01 Michael Snyder <msnyder@vmware.com>
+ * ada-lang.c (ada_make_symbol_completion_list): Replace malloc
+ with xmalloc.
+
* ada-lang.c (aggregate_assign_others): Rename inner scope variable
which shadows function parameter.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 55b05f1..d0a1014 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -5634,7 +5634,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
{
const size_t completions_size =
VEC_length (char_ptr, completions) * sizeof (char *);
- char **result = malloc (completions_size);
+ char **result = xmalloc (completions_size);
memcpy (result, VEC_address (char_ptr, completions), completions_size);