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

Commit 63cc5bcc authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

net: sched: fix block->refcnt decrement



Currently the refcnt is never decremented in case the value is not 1.
Fix it by adding decrement in case the refcnt is not 1.

Reported-by: default avatarVlad Buslov <vladbu@mellanox.com>
Fixes: f71e0ca4 ("net: sched: Avoid implicit chain 0 creation")
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0bab1cdc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -780,6 +780,8 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q,
		block->refcnt--;
		if (list_empty(&block->chain_list))
			kfree(block);
	} else {
		block->refcnt--;
	}
}
EXPORT_SYMBOL(tcf_block_put_ext);