aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-param.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-param.c')
-rw-r--r--gdb/python/py-param.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c
index 06b9ae9..dcc110f 100644
--- a/gdb/python/py-param.c
+++ b/gdb/python/py-param.c
@@ -594,9 +594,8 @@ compute_enum_values (parmpy_object *self, PyObject *enum_values)
return 0;
}
- self->enumeration = xmalloc ((size + 1) * sizeof (char *));
+ self->enumeration = XCNEWVEC (const char *, size + 1);
back_to = make_cleanup (free_current_contents, &self->enumeration);
- memset (self->enumeration, 0, (size + 1) * sizeof (char *));
for (i = 0; i < size; ++i)
{