aboutsummaryrefslogtreecommitdiff
path: root/gdb/objc-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r--gdb/objc-lang.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index aa55baf..f1f33ef 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -1259,7 +1259,8 @@ find_methods (struct symtab *symtab, char type,
}
if (objc_csym == NULL)
{
- objc_csym = xmalloc (sizeof (*objc_csym));
+ objc_csym = obstack_alloc (&objfile->objfile_obstack,
+ sizeof (*objc_csym));
*objc_csym = objfile_csym;
set_objfile_data (objfile, objc_objfile_data, objc_csym);
}