summaryrefslogtreecommitdiff
path: root/net/sched/act_skbmod.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-05-14 11:22:59 +0200
committerIngo Molnar <mingo@kernel.org>2018-05-14 11:22:59 +0200
commit4b96583869c4d990b779eca72976063970d41b8d (patch)
treef2fdb7760a06f6445f33fdee3ec512fbdb46fcb4 /net/sched/act_skbmod.c
parent53667c670fe00d63246fb3cfb4480bb1ba247bcc (diff)
parent67b8d5c7081221efa252e111cd52532ec6d4266f (diff)
Merge tag 'v4.17-rc5' into irq/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/sched/act_skbmod.c')
-rw-r--r--net/sched/act_skbmod.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c
index bbcbdce732cc..ad050d7d4b46 100644
--- a/net/sched/act_skbmod.c
+++ b/net/sched/act_skbmod.c
@@ -131,8 +131,11 @@ static int tcf_skbmod_init(struct net *net, struct nlattr *nla,
if (exists && bind)
return 0;
- if (!lflags)
+ if (!lflags) {
+ if (exists)
+ tcf_idr_release(*a, bind);
return -EINVAL;
+ }
if (!exists) {
ret = tcf_idr_create(tn, parm->index, est, a,