diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index e40712abe089e0..f63766366e238d 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -4291,6 +4291,8 @@ trace_action_create_field_var(struct hist_trigger_data *hist_data, event = data->match_data.event; } + if (!event) + goto free; /* * At this point, we're looking at a field on another * event. Because we can't modify a hist trigger on