This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] ada-lang.c, replace malloc call with xmalloc.


checked in.

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

	* ada-lang.c (ada_make_symbol_completion_list): Replace malloc
	with xmalloc.

Index: ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.286
diff -u -p -u -p -r1.286 ada-lang.c
--- ada-lang.c	1 Mar 2011 22:42:33 -0000	1.286
+++ ada-lang.c	1 Mar 2011 23:05:57 -0000
@@ -5634,7 +5634,7 @@ ada_make_symbol_completion_list (char *t
   {
     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);
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]