diff options
Diffstat (limited to 'tools/perf/util/thread.c')
-rw-r--r-- | tools/perf/util/thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 378c418ca0c1..1dbcd3c8dee0 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include "../perf.h" #include <errno.h> #include <stdlib.h> @@ -59,6 +60,8 @@ struct thread *thread__new(pid_t pid, pid_t tid) list_add(&comm->list, &thread->comm_list); refcount_set(&thread->refcnt, 1); RB_CLEAR_NODE(&thread->rb_node); + /* Thread holds first ref to nsdata. */ + thread->nsinfo = nsinfo__new(pid); } return thread; @@ -91,6 +94,7 @@ void thread__delete(struct thread *thread) comm__free(comm); } unwind__finish_access(thread); + nsinfo__zput(thread->nsinfo); free(thread); } |