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

Commit 4853f128 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

net: sched: fix possible null pointer deref in tcf_block_put



We need to check block for being null in both tcf_block_put and
tcf_block_put_ext.

Fixes: 343723dd ("net: sched: fix clsact init error path")
Reported-by: default avatarPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0a3d805c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
}