Unverified Commit 1b432c59 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15702 trace_events_hist: add check for return value of 'create_hist_field'

parents fcadd9f1 2e60e0ad
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2234,6 +2234,8 @@ static struct hist_field *create_hist_field(struct hist_trigger_data *hist_data,
		unsigned long fl = flags & ~HIST_FIELD_FL_LOG2;
		hist_field->fn = hist_field_log2;
		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(hist_field->operands[0]->type, GFP_KERNEL);
		if (!hist_field->type)