aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-01-10 22:14:18 +0000
committerAlan Modra <amodra@gmail.com>2006-01-10 22:14:18 +0000
commite2ba7bd7d01e857a94538d3570da3caf14300a24 (patch)
tree19d7df7f0eb1eeaa34a4775d1c151cc79685d6a7 /binutils/objcopy.c
parentca47226b72c43bb7ede3ab049ec7fbab6b3f9c1d (diff)
downloadgdb-e2ba7bd7d01e857a94538d3570da3caf14300a24.zip
gdb-e2ba7bd7d01e857a94538d3570da3caf14300a24.tar.gz
gdb-e2ba7bd7d01e857a94538d3570da3caf14300a24.tar.bz2
* objcopy.c (copy_object): Set isympp and osympp to NULL after free.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r--binutils/objcopy.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index e93534d6..410498c 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -1281,10 +1281,16 @@ copy_object (bfd *ibfd, bfd *obfd)
}
if (isympp)
- free (isympp);
+ {
+ free (isympp);
+ isympp = NULL;
+ }
if (osympp != isympp)
- free (osympp);
+ {
+ free (osympp);
+ osympp = NULL;
+ }
/* BFD mandates that all output sections be created and sizes set before
any output is done. Thus, we traverse all sections multiple times. */