summaryrefslogtreecommitdiff
path: root/gprof
diff options
context:
space:
mode:
authorsegher <segher>2010-03-16 18:24:24 +0000
committersegher <segher>2010-03-16 18:24:24 +0000
commit59cebc6baa8abd19554e31d3b6caa57e53403b34 (patch)
tree6026cf8631cf7e752e064ee6d382eae327611454 /gprof
parent097f4ec4f71fc53c155ecce28f18456dafdc64a8 (diff)
downloadbinutils-redhat-59cebc6baa8abd19554e31d3b6caa57e53403b34.tar.gz
2010-03-16 Segher Boessenkool <segher@kernel.crashing.org>
* gmon_io.c (gmon_out_read): Close file when done.
Diffstat (limited to 'gprof')
-rw-r--r--gprof/ChangeLog4
-rw-r--r--gprof/gmon_io.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index 5c616b9499..1cb31ec3a0 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -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.
diff --git a/gprof/gmon_io.c b/gprof/gmon_io.c
index f48d3bcc1f..1b046d4ed5 100644
--- a/gprof/gmon_io.c
+++ b/gprof/gmon_io.c
@@ -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"),