diff options
| -rw-r--r-- | net/sched/act_skbmod.c | 5 |
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, | |||
| 131 | if (exists && bind) | 131 | if (exists && bind) |
| 132 | return 0; | 132 | return 0; |
| 133 | 133 | ||
| 134 | if (!lflags) | 134 | if (!lflags) { |
| 135 | if (exists) | ||
| 136 | tcf_idr_release(*a, bind); | ||
| 135 | return -EINVAL; | 137 | return -EINVAL; |
| 138 | } | ||
| 136 | 139 | ||
| 137 | if (!exists) { | 140 | if (!exists) { |
| 138 | ret = tcf_idr_create(tn, parm->index, est, a, | 141 | ret = tcf_idr_create(tn, parm->index, est, a, |
