diff options
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index bc46bff69620..440f9ca067b2 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -2150,7 +2150,9 @@ static void free_event(struct perf_event *event) | |||
2150 | if (event->destroy) | 2150 | if (event->destroy) |
2151 | event->destroy(event); | 2151 | event->destroy(event); |
2152 | 2152 | ||
2153 | put_ctx(event->ctx); | 2153 | if (event->ctx) |
2154 | put_ctx(event->ctx); | ||
2155 | |||
2154 | call_rcu(&event->rcu_head, free_event_rcu); | 2156 | call_rcu(&event->rcu_head, free_event_rcu); |
2155 | } | 2157 | } |
2156 | 2158 | ||