From 4b41844bd9fdecbdc78d288f7d6b3012fee49b17 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 25 Mar 2011 17:49:32 +0000 Subject: [PATCH] * objdump.c (dump_reloc_set): Free malloced memory. --- binutils/ChangeLog | 11 ++++++----- binutils/objdump.c | 7 ++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4ee9ea9e684..d17deffb38b 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -13,11 +13,12 @@ (tg_class_method_variant): Likewise. (tg_class_static_method_variant): Likewise. * stabs.c (parse_stab_enum_type): Fix memory leaks. - (parse_stab_struct_type): Ditto. - (parse_stab_struct_fields): Ditto. - (parse_stab_one_struct_field): Ditto. - (parse_stab_members): Ditto. - (stab_demangle_qualified): Ditto. + (parse_stab_struct_type): Likewise. + (parse_stab_struct_fields): Likewise. + (parse_stab_one_struct_field): Likewise. + (parse_stab_members): Likewise. + (stab_demangle_qualified): Likewise. + * objdump.c (dump_reloc_set): Free malloced memory. 2011-03-25 Pierre Muller diff --git a/binutils/objdump.c b/binutils/objdump.c index 6b996a14a85..c2ce7ae4a40 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1,6 +1,6 @@ /* objdump.c -- dump information about an object file. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -2907,6 +2907,11 @@ dump_reloc_set (bfd *abfd, asection *sec, arelent **relpp, long relcount) printf ("\n"); } + + if (last_filename != NULL) + free (last_filename); + if (last_functionname != NULL) + free (last_functionname); } static void -- 2.30.2