diff options
author | Nick Clifton <nickc@redhat.com> | 2003-03-31 18:13:25 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-03-31 18:13:25 +0000 |
commit | 5ed6aba41c826194dcc97807392b22a3cefa1d7e (patch) | |
tree | 8e87d13436f477ba70e90e9109c69dcaf3d18e27 /bfd/linker.c | |
parent | ee42cf8cc569b0ad926df63483075ccd868a10fa (diff) | |
download | gdb-5ed6aba41c826194dcc97807392b22a3cefa1d7e.zip gdb-5ed6aba41c826194dcc97807392b22a3cefa1d7e.tar.gz gdb-5ed6aba41c826194dcc97807392b22a3cefa1d7e.tar.bz2 |
Fix memory leaks
Diffstat (limited to 'bfd/linker.c')
-rw-r--r-- | bfd/linker.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index 918f4f8..c0e3236 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -1,23 +1,23 @@ /* linker.c -- BFD linker routines - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -2081,12 +2081,12 @@ _bfd_generic_final_link (abfd, info) input_section, relocs, symbols); + free (relocs); if (reloc_count < 0) return FALSE; BFD_ASSERT ((unsigned long) reloc_count == input_section->reloc_count); o->reloc_count += reloc_count; - free (relocs); } } if (o->reloc_count > 0) |