diff options
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 4 |
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, ¶m)) { | 966 | if (sched_setscheduler(0, SCHED_FIFO, ¶m)) { |
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; |
982 | out_join: | ||
983 | pthread_join(thread, NULL); | ||
982 | out_delete: | 984 | out_delete: |
983 | perf_session__delete(top->session); | 985 | perf_session__delete(top->session); |
984 | top->session = NULL; | 986 | top->session = NULL; |