aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-05-18 22:57:11 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2009-05-18 22:57:11 +0000
commit6342b74acd00f16f0a0b60a04469a400cb86e884 (patch)
tree0aa6143ac8dd51a8ed80b97bad3fddc0cc8c64a7
parent1a816a878078a6b9f9358d444f881af4e353e891 (diff)
downloadgdb-6342b74acd00f16f0a0b60a04469a400cb86e884.zip
gdb-6342b74acd00f16f0a0b60a04469a400cb86e884.tar.gz
gdb-6342b74acd00f16f0a0b60a04469a400cb86e884.tar.bz2
2009-05-18 Paul Pluzhnikov <ppluzhnikov@google.com>
* objc-lang.c (find_methods): Plug a small memory leak.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/objc-lang.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dc775d1..b75d908 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-18 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * objc-lang.c (find_methods): Plug a small memory leak.
+
2009-05-18 Pedro Alves <pedro@codesourcery.com>
* solib-svr4.c: Include observer.h.
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);
}