aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-inject.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-inject.c')
-rw-r--r--tools/perf/builtin-inject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 76723ac314b6..61766eead4f4 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -630,10 +630,8 @@ static int dso__read_build_id(struct dso *dso)
if (filename__read_build_id(dso->long_name, &dso->bid) > 0)
dso->has_build_id = true;
else if (dso->nsinfo) {
- char *new_name;
+ char *new_name = dso__filename_with_chroot(dso, dso->long_name);
- new_name = filename_with_chroot(dso->nsinfo->pid,
- dso->long_name);
if (new_name && filename__read_build_id(new_name, &dso->bid) > 0)
dso->has_build_id = true;
free(new_name);