Merge tag 'trace-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[sfrench/cifs-2.6.git] / kernel / trace / trace_events_hist.c
index fcaf226b77446b4ba32fb51b03dd92b8a5a5ab73..5edbf6b1da3f311805218c252dd4559d249585e0 100644 (file)
@@ -1988,6 +1988,8 @@ static struct hist_field *create_hist_field(struct hist_trigger_data *hist_data,
                hist_field->fn_num = flags & HIST_FIELD_FL_LOG2 ? HIST_FIELD_FN_LOG2 :
                        HIST_FIELD_FN_BUCKET;
                hist_field->operands[0] = create_hist_field(hist_data, field, fl, NULL);
+               if (!hist_field->operands[0])
+                       goto free;
                hist_field->size = hist_field->operands[0]->size;
                hist_field->type = kstrdup_const(hist_field->operands[0]->type, GFP_KERNEL);
                if (!hist_field->type)