mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
net: sched: fix unbalance in the error path of tca_action_flush()
When tca_action_flush() calls the action walk() and gets an error, a successful call to nla_nest_start() is not followed by a call to nla_nest_cancel(). It's harmless, as the skb is freed in the error path - but it's worth to fix this unbalance. Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e5fe068a50
commit
66dede2d6b
1 changed files with 3 additions and 1 deletions
|
@ -938,8 +938,10 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
|
|||
goto out_module_put;
|
||||
|
||||
err = ops->walk(net, skb, &dcb, RTM_DELACTION, ops);
|
||||
if (err <= 0)
|
||||
if (err <= 0) {
|
||||
nla_nest_cancel(skb, nest);
|
||||
goto out_module_put;
|
||||
}
|
||||
|
||||
nla_nest_end(skb, nest);
|
||||
|
||||
|
|
Loading…
Reference in a new issue