net/sched: fix refcnt leak in the error path of tcf_vlan_init()
authorDavide Caratti <dcaratti@redhat.com>
Wed, 16 May 2018 10:54:29 +0000 (12:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:17:23 +0000 (16:17 +0200)
commit53b2dbbee18dc6bd94d73050eedb9ab4fa1120f6
tree2b3373f23ed74de5513cf647925729c1af8fa0fa
parent5ff45c86e90a493f8e332c9218026c183ce724e2
net/sched: fix refcnt leak in the error path of tcf_vlan_init()

[ Upstream commit 5a4931ae0193f8a4a97e8260fd0df1d705d83299 ]

Similarly to what was done with commit a52956dfc503 ("net sched actions:
fix refcnt leak in skbmod"), fix the error path of tcf_vlan_init() to avoid
refcnt leaks when wrong value of TCA_VLAN_PUSH_VLAN_PROTOCOL is given.

Fixes: 5026c9b1bafc ("net sched: vlan action fix late binding")
CC: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/act_vlan.c