diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 75529b311769..1b7f90e00eb0 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -3405,6 +3405,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