mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 00:34:10 +08:00
net/sched: fix refcnt leak in the error path of tcf_vlan_init()
Similarly to what was done with commita52956dfc5
("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:5026c9b1ba
("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>
This commit is contained in:
parent
e49ac9679e
commit
5a4931ae01
@ -161,6 +161,8 @@ static int tcf_vlan_init(struct net *net, struct nlattr *nla,
|
||||
case htons(ETH_P_8021AD):
|
||||
break;
|
||||
default:
|
||||
if (exists)
|
||||
tcf_idr_release(*a, bind);
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user