aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 4fb6f726271c..10fc7e844872 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -965,7 +965,7 @@ static int __cmd_top(struct perf_top *top)
965 param.sched_priority = top->realtime_prio; 965 param.sched_priority = top->realtime_prio;
966 if (sched_setscheduler(0, SCHED_FIFO, &param)) { 966 if (sched_setscheduler(0, SCHED_FIFO, &param)) {
967 ui__error("Could not set realtime priority.\n"); 967 ui__error("Could not set realtime priority.\n");
968 goto out_delete; 968 goto out_join;
969 } 969 }
970 } 970 }
971 971
@@ -979,6 +979,8 @@ static int __cmd_top(struct perf_top *top)
979 } 979 }
980 980
981 ret = 0; 981 ret = 0;
982out_join:
983 pthread_join(thread, NULL);
982out_delete: 984out_delete:
983 perf_session__delete(top->session); 985 perf_session__delete(top->session);
984 top->session = NULL; 986 top->session = NULL;