aboutsummaryrefslogtreecommitdiff
path: root/gprof/gmon_io.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2010-03-16 18:24:24 +0000
committerSegher Boessenkool <segher@kernel.crashing.org>2010-03-16 18:24:24 +0000
commitd9097b0b398d34090f9cae92c051edf2edba73ac (patch)
tree72f616057b64e3b0149a5d25a9489ed50a07e04d /gprof/gmon_io.c
parente92d13d5bcf6a7d365fcbaae5af81ad80648fe8f (diff)
downloadgdb-d9097b0b398d34090f9cae92c051edf2edba73ac.zip
gdb-d9097b0b398d34090f9cae92c051edf2edba73ac.tar.gz
gdb-d9097b0b398d34090f9cae92c051edf2edba73ac.tar.bz2
2010-03-16 Segher Boessenkool <segher@kernel.crashing.org>
* gmon_io.c (gmon_out_read): Close file when done.
Diffstat (limited to 'gprof/gmon_io.c')
-rw-r--r--gprof/gmon_io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gprof/gmon_io.c b/gprof/gmon_io.c
index f48d3bc..1b046d4 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"),