diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2012-01-17 07:55:28 -0500 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2012-01-17 07:55:28 -0500 |
| commit | 0c929238ca4baefe47f4034732db4c154f2329c6 (patch) | |
| tree | 2636079800fa045501982a70e1be0425c1b968c2 /tools/perf/builtin-script.c | |
| parent | 6d7120a713300283a8b73e7d86cd1bab8b9d1971 (diff) | |
| parent | 78da107a7ed14fbc6ef77ff4c41d92b11edc9036 (diff) | |
Merge branch 'sh/platform-updates' into sh-latest
Diffstat (limited to 'tools/perf/builtin-script.c')
| -rw-r--r-- | tools/perf/builtin-script.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index fd1909afcfd6..bb68ddf257b7 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
| @@ -1018,13 +1018,17 @@ static char *get_script_path(const char *script_root, const char *suffix) | |||
| 1018 | __script_root = get_script_root(&script_dirent, suffix); | 1018 | __script_root = get_script_root(&script_dirent, suffix); |
| 1019 | if (__script_root && !strcmp(script_root, __script_root)) { | 1019 | if (__script_root && !strcmp(script_root, __script_root)) { |
| 1020 | free(__script_root); | 1020 | free(__script_root); |
| 1021 | closedir(lang_dir); | ||
| 1022 | closedir(scripts_dir); | ||
| 1021 | snprintf(script_path, MAXPATHLEN, "%s/%s", | 1023 | snprintf(script_path, MAXPATHLEN, "%s/%s", |
| 1022 | lang_path, script_dirent.d_name); | 1024 | lang_path, script_dirent.d_name); |
| 1023 | return strdup(script_path); | 1025 | return strdup(script_path); |
| 1024 | } | 1026 | } |
| 1025 | free(__script_root); | 1027 | free(__script_root); |
| 1026 | } | 1028 | } |
| 1029 | closedir(lang_dir); | ||
| 1027 | } | 1030 | } |
| 1031 | closedir(scripts_dir); | ||
| 1028 | 1032 | ||
| 1029 | return NULL; | 1033 | return NULL; |
| 1030 | } | 1034 | } |
