Fix last patch.
authorIan Lance Taylor <ian@airs.com>
Tue, 29 Mar 1994 20:34:10 +0000 (20:34 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 29 Mar 1994 20:34:10 +0000 (20:34 +0000)
binutils/nm.c

index 8aca314caf0b0100b5c011a7edba7093d79fa5ff..201c3c90104b1cc3cc8ef8245eee844a72a30672 100644 (file)
@@ -369,6 +369,7 @@ display_archive (file)
      bfd *file;
 {
   bfd *arfile = NULL;
+  bfd *last_arfile = NULL;
   char **matching;
 
   (*format->print_archive_filename) (bfd_get_filename (file));
@@ -403,8 +404,13 @@ display_archive (file)
            }
        }
 
-      bfd_close (arfile);
+      if (last_arfile != NULL)
+       bfd_close (last_arfile);
+      last_arfile = arfile;
     }
+
+  if (last_arfile != NULL)
+    bfd_close (last_arfile);
 }
 
 static boolean