diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 4886ea4a7d6e790660d4d0a86ba021c88c488a4d..624995564e5abb2ef352de95b40f78b72e819940 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -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);