net: sched: potential NULL dereference in tcf_block_find()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 18 Feb 2019 09:26:32 +0000 (12:26 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Feb 2019 21:11:07 +0000 (13:11 -0800)
commitaf736bf071e8ccf395fa7f7d9d105e020cf609cc
tree29c55cdda7ff511bcb74baa0f1b11ad19e71c759
parent56b90fa02214e74263a12a227e71ddd748c3fab0
net: sched: potential NULL dereference in tcf_block_find()

The error code isn't set on this path so it would result in returning
ERR_PTR(0) and a NULL dereference in the caller.

Fixes: 18d3eefb17cf ("net: sched: refactor tcf_block_find() into standalone functions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c