+2001-11-12 Jim Blandy <jimb@redhat.com>
+
+ Patch from Andreas Schwab <schwab@suse.de>:
+ * eval.c (evaluate_subexp_standard): Fix memory leak: use alloca
+ instead of xmalloc.
+
2001-11-12 Jim Blandy <jimb@redhat.com>
* corefile.c (write_memory_unsigned_integer,
struct value *valp = NULL;
/* Prepare list of argument types for overload resolution */
- arg_types = (struct type **) xmalloc (nargs * (sizeof (struct type *)));
+ arg_types = (struct type **) alloca (nargs * (sizeof (struct type *)));
for (ix = 1; ix <= nargs; ix++)
arg_types[ix - 1] = VALUE_TYPE (argvec[ix]);
struct symbol *symp;
/* Prepare list of argument types for overload resolution */
- arg_types = (struct type **) xmalloc (nargs * (sizeof (struct type *)));
+ arg_types = (struct type **) alloca (nargs * (sizeof (struct type *)));
for (ix = 1; ix <= nargs; ix++)
arg_types[ix - 1] = VALUE_TYPE (argvec[ix]);