From: Paul Pluzhnikov Date: Mon, 18 May 2009 22:57:11 +0000 (+0000) Subject: 2009-05-18 Paul Pluzhnikov X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6342b74acd00f16f0a0b60a04469a400cb86e884;p=binutils-gdb.git 2009-05-18 Paul Pluzhnikov * objc-lang.c (find_methods): Plug a small memory leak. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dc775d1b776..b75d9080752 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2009-05-18 Paul Pluzhnikov + + * objc-lang.c (find_methods): Plug a small memory leak. + 2009-05-18 Pedro Alves * solib-svr4.c: Include observer.h. diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index aa55baf50ba..f1f33efe1ab 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); }