X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=net%2Fsched%2Fact_simple.c;h=3714f60f0b3c5869725e449de8456ec9bd6b20fe;hb=f82202bae3f7f076402b16ca7bced9928aad16d0;hp=3922f2a2821b83cf3f9db318980a7cad06111e1f;hpb=a70f35af4e49f87ba4b6c4b30220fbb66cd74af6;p=firefly-linux-kernel-4.4.55.git diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 3922f2a2821b..3714f60f0b3c 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c @@ -131,7 +131,10 @@ static int tcf_simp_init(struct nlattr *nla, struct nlattr *est, d = to_defact(pc); ret = alloc_defdata(d, defdata); if (ret < 0) { - kfree(pc); + if (est) + gen_kill_estimator(&pc->tcfc_bstats, + &pc->tcfc_rate_est); + kfree_rcu(pc, tcfc_rcu); return ret; } d->tcf_action = parm->action;