Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e4cf2bf authored by Dan Carpenter's avatar Dan Carpenter Committed by Steven Rostedt (VMware)
Browse files

tracing: Fix a potential NULL dereference

We forgot to set the error code on this path so we return ERR_PTR(0)
which is NULL.  It results in a NULL dereference in the caller.

Link: http://lkml.kernel.org/r/20180323113735.GC28518@mwanda



Fixes: 100719dc ("tracing: Add simple expression support to hist triggers")
Acked-by: default avatarTom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 80765597
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2776,6 +2776,7 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
		expr->fn = hist_field_plus;
		break;
	default:
		ret = -EINVAL;
		goto free;
	}