2011-03-01 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 1 Mar 2011 23:07:40 +0000 (23:07 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 1 Mar 2011 23:07:40 +0000 (23:07 +0000)
* ada-lang.c (ada_make_symbol_completion_list): Replace malloc
with xmalloc.

gdb/ChangeLog
gdb/ada-lang.c

index 5be6deaeed7daa5c90c1da2e54433588a11d21bd..9259a5ede413e4a28a72b9f306d86b9075491d70 100644 (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.
 
index 55b05f102e55ccdff1fbce31f98fb0b204d463dd..d0a10146dd66b9073a73894f9d1df99caa4841aa 100644 (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);