aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-03-31 18:13:25 +0000
committerNick Clifton <nickc@redhat.com>2003-03-31 18:13:25 +0000
commit5ed6aba41c826194dcc97807392b22a3cefa1d7e (patch)
tree8e87d13436f477ba70e90e9109c69dcaf3d18e27 /ld/ldmisc.c
parentee42cf8cc569b0ad926df63483075ccd868a10fa (diff)
downloadgdb-5ed6aba41c826194dcc97807392b22a3cefa1d7e.zip
gdb-5ed6aba41c826194dcc97807392b22a3cefa1d7e.tar.gz
gdb-5ed6aba41c826194dcc97807392b22a3cefa1d7e.tar.bz2
Fix memory leaks
Diffstat (limited to 'ld/ldmisc.c')
-rw-r--r--ld/ldmisc.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 94b03d4..4f25dbb 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -1,25 +1,25 @@
/* ldmisc.c
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2002
+ 2000, 2002, 2003
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
-This file is part of GLD, the Gnu Linker.
+ This file is part of GLD, the Gnu Linker.
-GLD 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, or (at your option)
-any later version.
+ GLD 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, or (at your option)
+ any later version.
-GLD 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.
+ GLD 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 GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -328,6 +328,9 @@ vfinfo (fp, fmt, arg)
fprintf (fp, ":%u", linenumber);
}
+ if (asymbols != NULL && entry == NULL)
+ free (asymbols);
+
if (discard_last)
{
last_bfd = NULL;