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:
parent
0e8ad34f4d
commit
8c1a34e7f5
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue