opcodes/
[deliverable/binutils-gdb.git] / gprof / gmon_io.c
index f48d3bcc1f0b485425f96ad352b9b83171a902f7..fbb89f50e72657cb2aadcbb2b219ceecb082cb07 100644 (file)
@@ -551,8 +551,6 @@ gmon_out_read (const char *filename)
          cg_tally (from_pc, self_pc, count);
        }
 
-      fclose (ifp);
-
       if (hz == HZ_WRONG)
        {
          /* How many ticks per second?  If we can't tell, report
@@ -573,6 +571,9 @@ gmon_out_read (const char *filename)
       done (1);
     }
 
+  if (ifp != stdin)
+    fclose (ifp);
+
   if (output_style & STYLE_GMON_INFO)
     {
       printf (_("File `%s' (version %d) contains:\n"),
This page took 0.024098 seconds and 4 git commands to generate.