net: sched: fix block->refcnt decrement
authorJiri Pirko <jiri@mellanox.com>
Wed, 8 Aug 2018 12:04:13 +0000 (14:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Aug 2018 21:12:04 +0000 (14:12 -0700)
commit63cc5bcc9fc467bbe61cc9ee52509294bdf04c4b
treef7a846f8c2ef0d44c1c3b99b5dab3e613e28ec4b
parent0bab1cdc8c4d5392a5d9037cfbdbb2cacc91ce5e
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: Vlad Buslov <vladbu@mellanox.com>
Fixes: f71e0ca4db18 ("net: sched: Avoid implicit chain 0 creation")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c