From: Jiri Pirko <j...@mellanox.com> We need to check block for being null in both tcf_block_put and tcf_block_put_ext.
Fixes: 343723dd51ef ("net: sched: fix clsact init error path") Reported-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp> Signed-off-by: Jiri Pirko <j...@mellanox.com> --- net/sched/cls_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index b91ea03..b9d63d2 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -379,6 +379,8 @@ void tcf_block_put(struct tcf_block *block) { struct tcf_block_ext_info ei = {0, }; + if (!block) + return; tcf_block_put_ext(block, block->q, &ei); } -- 2.9.5