summaryrefslogtreecommitdiff
path: root/net/sched/act_ife.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/act_ife.c')
-rw-r--r--net/sched/act_ife.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c
index a3eef00cd711..3d6e265758c0 100644
--- a/net/sched/act_ife.c
+++ b/net/sched/act_ife.c
@@ -485,8 +485,10 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
return -ENOMEM;
err = tcf_idr_check_alloc(tn, &parm->index, a, bind);
- if (err < 0)
+ if (err < 0) {
+ kfree(p);
return err;
+ }
exists = err;
if (exists && bind) {
kfree(p);