diff options
Diffstat (limited to 'tools/perf/util/path.c')
-rw-r--r-- | tools/perf/util/path.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c index b276c187802a..58a470d036dd 100644 --- a/tools/perf/util/path.c +++ b/tools/perf/util/path.c | |||
@@ -152,5 +152,5 @@ char *strip_path_suffix(const char *path, const char *suffix) | |||
152 | 152 | ||
153 | if (path_len && !is_dir_sep(path[path_len - 1])) | 153 | if (path_len && !is_dir_sep(path[path_len - 1])) |
154 | return NULL; | 154 | return NULL; |
155 | return xstrndup(path, chomp_trailing_dir_sep(path, path_len)); | 155 | return strndup(path, chomp_trailing_dir_sep(path, path_len)); |
156 | } | 156 | } |