* elflink.c (is_reloc_section): New function. Returns true if the
[deliverable/binutils-gdb.git] / bfd / vms.c
index c73692e32b5d842b7b7c6c44ce9ef629ce62fcea..1944c1ee06736cc6c032ebc81b2d16e5cb417616 100644 (file)
--- a/bfd/vms.c
+++ b/bfd/vms.c
@@ -1,13 +1,13 @@
 /* vms.c -- BFD back-end for VAX (openVMS/VAX) and
    EVAX (openVMS/Alpha) files.
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007 Free Software Foundation, Inc.
+   2006, 2007, 2008 Free Software Foundation, Inc.
 
    Written by Klaus K"ampf (kkaempf@rmi.de)
 
    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
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -17,7 +17,8 @@
 
    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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "sysdep.h"
 #include "bfd.h"
@@ -427,7 +428,8 @@ vms_close_and_cleanup (bfd * abfd)
 #if VMS_DEBUG
   vms_debug (1, "vms_close_and_cleanup (%p)\n", abfd);
 #endif
-  if (abfd == NULL)
+  if (abfd == NULL
+      || abfd->tdata.any == NULL)
     return TRUE;
 
   if (PRIV (vms_buf) != NULL)
@@ -474,7 +476,7 @@ vms_new_section_hook (bfd * abfd, asection *section)
     {
       bfd_size_type amt = section_count;
       amt *= sizeof (asection *);
-      PRIV (sections) = bfd_realloc (PRIV (sections), amt);
+      PRIV (sections) = bfd_realloc_or_free (PRIV (sections), amt);
       if (PRIV (sections) == NULL)
        return FALSE;
       PRIV (section_count) = section_count;
This page took 0.028877 seconds and 4 git commands to generate.