diff options
author | Nick Clifton <nickc@redhat.com> | 2013-10-09 16:34:30 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2013-10-09 16:34:30 +0000 |
commit | 5af84f938a38bc6cb15271167aa0312b6800cf55 (patch) | |
tree | 98db5b4d066fdce1029e757eb8e7a00f9c653d50 /gprof | |
parent | d9313f4f43f9bb23fb1ef3a93c4879c706d5e881 (diff) | |
download | gdb-5af84f938a38bc6cb15271167aa0312b6800cf55.zip gdb-5af84f938a38bc6cb15271167aa0312b6800cf55.tar.gz gdb-5af84f938a38bc6cb15271167aa0312b6800cf55.tar.bz2 |
PR gprof/16027
* source.c (annotate_source): Close ifp.
* corefile.c (read_function_mappings): Close file.
Diffstat (limited to 'gprof')
-rw-r--r-- | gprof/ChangeLog | 6 | ||||
-rw-r--r-- | gprof/corefile.c | 5 | ||||
-rw-r--r-- | gprof/source.c | 3 |
3 files changed, 11 insertions, 3 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog index 1eb0c65..fc6cb9f 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,9 @@ +2013-10-09 Nick Clifton <nickc@redhat.com> + + PR gprof/16027 + * source.c (annotate_source): Close ifp. + * corefile.c (read_function_mappings): Close file. + 2013-09-20 Alan Modra <amodra@gmail.com> * configure: Regenerate. diff --git a/gprof/corefile.c b/gprof/corefile.c index 0aabbad..44184dc 100644 --- a/gprof/corefile.c +++ b/gprof/corefile.c @@ -1,7 +1,6 @@ /* corefile.c - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, - 2010, 2011, 2012 Free Software Foundation, Inc. + Copyright 1999-2013 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -164,6 +163,8 @@ read_function_mappings (const char *filename) symbol_map[i].is_first = 1; qsort (symbol_map, symbol_map_count, sizeof (struct function_map), cmp_symbol_map); + + fclose (file); } void diff --git a/gprof/source.c b/gprof/source.c index 1a445d3..120e51a 100644 --- a/gprof/source.c +++ b/gprof/source.c @@ -1,6 +1,6 @@ /* source.c - Keep track of source files. - Copyright 2000, 2001, 2002, 2004, 2007 Free Software Foundation, Inc. + Copyright 2000-2013 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -259,5 +259,6 @@ annotate_source (Source_File *sf, unsigned int max_width, } free (annotation); + fclose (ifp); return ofp; } |