2011-03-01 Michael Snyder <msnyder@vmware.com>

* ada-lang.c (ada_make_symbol_completion_list): Replace malloc
	with xmalloc.
This commit is contained in:
Michael Snyder 2011-03-01 23:07:40 +00:00
parent 75c362b84e
commit dc19db01c1
2 changed files with 4 additions and 1 deletions

View File

@ -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.

View File

@ -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);