From: Alan Modra Date: Tue, 10 Jan 2006 22:34:03 +0000 (+0000) Subject: * objcopy.c (copy_object): Fix thinko. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=62d732f54031c330e112363204668ee69a0f4556;p=binutils-gdb.git * objcopy.c (copy_object): Fix thinko. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index dacc5da1980..1804208058f 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,7 @@ 2006-01-11 Alan Modra + * objcopy.c (copy_object): Fix thinko. + * objcopy.c (copy_object): Set isympp and osympp to NULL after free. 2006-01-09 Mike Frysinger : diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 410498c8d85..2ab3d06bff3 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1281,16 +1281,13 @@ copy_object (bfd *ibfd, bfd *obfd) } if (isympp) - { - free (isympp); - isympp = NULL; - } + free (isympp); if (osympp != isympp) - { - free (osympp); - osympp = NULL; - } + free (osympp); + + isympp = NULL; + 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. */