OSDN Git Service

2010-03-16 Segher Boessenkool <segher@kernel.crashing.org>
authorsegher <segher>
Tue, 16 Mar 2010 18:24:24 +0000 (18:24 +0000)
committersegher <segher>
Tue, 16 Mar 2010 18:24:24 +0000 (18:24 +0000)
        * gmon_io.c (gmon_out_read): Close file when done.

gprof/ChangeLog
gprof/gmon_io.c

index 5c616b9..1cb31ec 100644 (file)
@@ -1,3 +1,7 @@
+2010-03-16  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * gmon_io.c (gmon_out_read): Close file when done.
+
 2010-02-15  Nick Clifton  <nickc@redhat.com>
 
        * po/vi.po: Updated Vietnamese translation.
index f48d3bc..1b046d4 100644 (file)
@@ -573,6 +573,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"),