aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/cleanups.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/common/cleanups.c')
-rw-r--r--gdb/common/cleanups.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/common/cleanups.c b/gdb/common/cleanups.c
index e57e4cc..2b48e86 100644
--- a/gdb/common/cleanups.c
+++ b/gdb/common/cleanups.c
@@ -79,8 +79,7 @@ static struct cleanup *
make_my_cleanup2 (struct cleanup **pmy_chain, make_cleanup_ftype *function,
void *arg, void (*free_arg) (void *))
{
- struct cleanup *newobj
- = (struct cleanup *) xmalloc (sizeof (struct cleanup));
+ struct cleanup *newobj = XNEW (struct cleanup);
struct cleanup *old_chain = *pmy_chain;
newobj->next = *pmy_chain;