diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-05-18 22:57:11 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-05-18 22:57:11 +0000 |
commit | 6342b74acd00f16f0a0b60a04469a400cb86e884 (patch) | |
tree | 0aa6143ac8dd51a8ed80b97bad3fddc0cc8c64a7 /gdb/objc-lang.c | |
parent | 1a816a878078a6b9f9358d444f881af4e353e891 (diff) | |
download | gdb-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.
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r-- | gdb/objc-lang.c | 3 |
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); } |