From 962b30bbac3da1d3b7ac5bf09af8c7da7c899f71 Mon Sep 17 00:00:00 2001 From: Xiao Guangrong Date: Mon, 28 Dec 2009 16:49:38 +0800 Subject: [PATCH] --- yaml --- r: 182331 b: refs/heads/master c: 9967411e5b324a908e344d6ce66b77bd5d372c3e h: refs/heads/master i: 182329: 46c676d870aac0cd7c47d9a650beabaffb53813e 182327: e656eda28ab2c4a09b97f3acb79bf1e27c7e0788 v: v3 --- [refs] | 2 +- trunk/tools/perf/util/trace-event-info.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3ac26bce292d..7336b5710fc7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 61be3e59ba7a6dbd39f92fd1f107285a0caeb008 +refs/heads/master: 9967411e5b324a908e344d6ce66b77bd5d372c3e diff --git a/trunk/tools/perf/util/trace-event-info.c b/trunk/tools/perf/util/trace-event-info.c index 535176dc95b6..407fd65b6cdb 100644 --- a/trunk/tools/perf/util/trace-event-info.c +++ b/trunk/tools/perf/util/trace-event-info.c @@ -253,6 +253,8 @@ static void read_header_files(void) write_or_die("header_page", 12); write_or_die(&size, 8); check_size = copy_file_fd(fd); + close(fd); + if (size != check_size) die("wrong size for '%s' size=%lld read=%lld", path, size, check_size); @@ -271,6 +273,7 @@ static void read_header_files(void) if (size != check_size) die("wrong size for '%s'", path); put_tracing_file(path); + close(fd); } static bool name_in_tp_list(char *sys, struct tracepoint_path *tps) @@ -337,6 +340,7 @@ static void copy_event_system(const char *sys, struct tracepoint_path *tps) free(format); } + closedir(dir); } static void read_ftrace_files(struct tracepoint_path *tps) @@ -407,6 +411,7 @@ static void read_event_files(struct tracepoint_path *tps) free(sys); } + closedir(dir); put_tracing_file(path); }