aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@plumgrid.com>2015-08-25 23:06:32 -0400
committerDavid S. Miller <davem@davemloft.net>2015-08-26 14:01:44 -0400
commitfaa54be4c78da6aa2148c539659867afdecd3e8d (patch)
tree44eb1ad0bb5bbf322ee607666f9e50f1c82c20d5 /net/sched
parent3c645621b79828be7a46fb2694eb423b343b4bbe (diff)
net_sched: act_bpf: remove unnecessary copy
Fix harmless typo and avoid unnecessary copy of empty 'prog' into unused 'strcut tcf_bpf_cfg old'. Fixes: f4eaed28c783 ("act_bpf: fix memory leaks when replacing bpf programs") Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index 1b97dabc621a..458cf647e698 100644
--- a/net/sched/act_bpf.c
+++ b/net/sched/act_bpf.c
@@ -327,7 +327,7 @@ static int tcf_bpf_init(struct net *net, struct nlattr *nla,
327 prog = to_bpf(act); 327 prog = to_bpf(act);
328 spin_lock_bh(&prog->tcf_lock); 328 spin_lock_bh(&prog->tcf_lock);
329 329
330 if (ret != ACT_P_CREATED) 330 if (res != ACT_P_CREATED)
331 tcf_bpf_prog_fill_cfg(prog, &old); 331 tcf_bpf_prog_fill_cfg(prog, &old);
332 332
333 prog->bpf_ops = cfg.bpf_ops; 333 prog->bpf_ops = cfg.bpf_ops;