PR binutils/5535
authorNick Clifton <nickc@redhat.com>
Mon, 7 Jan 2008 17:53:03 +0000 (17:53 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 7 Jan 2008 17:53:03 +0000 (17:53 +0000)
   * vms.c (vms_close_and_cleanup): Check for the presence of a
   vms_private_data_struct before examining any of its fields.

bfd/ChangeLog
bfd/vms.c

index ef3fc9f730f2f304cdf18742c9c59fba52b817ed..09cd0e4882467d2291562a5c9c0c6e30714ed924 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-07  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/5535
+       * vms.c (vms_close_and_cleanup): Check for the presence of a
+       vms_private_data_struct before examining any of its fields.
+
 2008-01-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/5522
index 457aea86d028259f39eedc3f5ee9ae9edb87cceb..bb5ab118c723130bf2550ebfd6da80babad94f49 100644 (file)
--- a/bfd/vms.c
+++ b/bfd/vms.c
@@ -428,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)