mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-02 04:27:46 +08:00
use xzalloc in ada-lang.c:replace_operator_with_call
This is to make sure that we cannot have a field with an undefined value (currently, we are not setting the gdbarch). gdb/ChangeLog: * ada-lang.c (replace_operator_with_call): Use xzalloc instead of xmalloc.
This commit is contained in:
@ -3655,7 +3655,7 @@ replace_operator_with_call (struct expression **expp, int pc, int nargs,
|
||||
/* A new expression, with 6 more elements (3 for funcall, 4 for function
|
||||
symbol, -oplen for operator being replaced). */
|
||||
struct expression *newexp = (struct expression *)
|
||||
xmalloc (sizeof (struct expression)
|
||||
xzalloc (sizeof (struct expression)
|
||||
+ EXP_ELEM_TO_BYTES ((*expp)->nelts + 7 - oplen));
|
||||
struct expression *exp = *expp;
|
||||
|
||||
|
Reference in New Issue
Block a user