mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 22:03:57 +08:00
Patch from Andreas Schwab <schwab@suse.de>:
* eval.c (evaluate_subexp_standard): Fix memory leak: use alloca instead of xmalloc.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2001-11-12 Jim Blandy <jimb@redhat.com>
|
||||||
|
|
||||||
* corefile.c (write_memory_unsigned_integer,
|
* corefile.c (write_memory_unsigned_integer,
|
||||||
|
@ -839,7 +839,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||||||
struct value *valp = NULL;
|
struct value *valp = NULL;
|
||||||
|
|
||||||
/* Prepare list of argument types for overload resolution */
|
/* 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++)
|
for (ix = 1; ix <= nargs; ix++)
|
||||||
arg_types[ix - 1] = VALUE_TYPE (argvec[ix]);
|
arg_types[ix - 1] = VALUE_TYPE (argvec[ix]);
|
||||||
|
|
||||||
@ -888,7 +888,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||||||
struct symbol *symp;
|
struct symbol *symp;
|
||||||
|
|
||||||
/* Prepare list of argument types for overload resolution */
|
/* 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++)
|
for (ix = 1; ix <= nargs; ix++)
|
||||||
arg_types[ix - 1] = VALUE_TYPE (argvec[ix]);
|
arg_types[ix - 1] = VALUE_TYPE (argvec[ix]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user