diff options
author | Joel Brobecker <brobecker@gnat.com> | 2011-03-21 14:43:14 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2011-03-21 14:43:14 +0000 |
commit | 8c1a34e7f56df3c2a3de9946bd185a897c18c20d (patch) | |
tree | 87abeb0b0b794d3bbe3d2cc74ab37f342b62fb00 /gdb/ada-lang.c | |
parent | 0e8ad34f4dcf33bfc81bd85a8190756691aed9bc (diff) | |
download | gdb-8c1a34e7f56df3c2a3de9946bd185a897c18c20d.zip gdb-8c1a34e7f56df3c2a3de9946bd185a897c18c20d.tar.gz gdb-8c1a34e7f56df3c2a3de9946bd185a897c18c20d.tar.bz2 |
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.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index ed51ab0..392ffea 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -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; |