* tlink.c (scan_linker_output): Call fclose() for opened files.
authorKamil Iskra <iskra@student.uci.agh.edu.pl>
Tue, 27 Jan 1998 09:23:08 +0000 (10:23 +0100)
committerJeff Law <law@gcc.gnu.org>
Tue, 27 Jan 1998 09:23:08 +0000 (02:23 -0700)
From-SVN: r17504

gcc/ChangeLog
gcc/tlink.c

index ba970d5f15c3c132098ee81b2fd6eac872227f45..545ac816f67b811c2a843d9be4fbc9350e4792fe 100644 (file)
@@ -1,3 +1,7 @@
+Tue Jan 27 10:22:13 1998  Kamil Iskra  <iskra@student.uci.agh.edu.pl>
+
+       * tlink.c (scan_linker_output): Call fclose() for opened files.
+
 Tue Jan 27 05:05:26 1998  Richard Henderson  <rth@cygnus.com>
 
        * alpha.c (output_epilog [!VMS]): Don't tag global functions if
index 017ac42131ed1372a8913049335352c5a52d1442..eb3d878ec5134353963a65df3dc3be9ae1e0d32e 100644 (file)
@@ -575,7 +575,10 @@ scan_linker_output (fname)
        }
 
       if (sym && sym->tweaked)
-       return 0;
+       {
+         fclose (stream);
+         return 0;
+       }
       if (sym && !sym->tweaking)
        {
          if (tlink_verbose >= 2)
@@ -588,6 +591,7 @@ scan_linker_output (fname)
       obstack_free (&temporary_obstack, temporary_firstobj);
     }
 
+  fclose (stream);
   return (file_stack != NULL);
 }