From: Segher Boessenkool Date: Tue, 16 Mar 2010 18:24:24 +0000 (+0000) Subject: 2010-03-16 Segher Boessenkool X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9097b0b398d34090f9cae92c051edf2edba73ac;p=binutils-gdb.git 2010-03-16 Segher Boessenkool * gmon_io.c (gmon_out_read): Close file when done. --- diff --git a/gprof/ChangeLog b/gprof/ChangeLog index 5c616b9499c..1cb31ec3a0f 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,7 @@ +2010-03-16 Segher Boessenkool + + * gmon_io.c (gmon_out_read): Close file when done. + 2010-02-15 Nick Clifton * po/vi.po: Updated Vietnamese translation. diff --git a/gprof/gmon_io.c b/gprof/gmon_io.c index f48d3bcc1f0..1b046d4ed5e 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"),