Skip to content

Commit

Permalink
net_sched: act_bpf: remove unnecessary copy
Browse files Browse the repository at this point in the history
Fix harmless typo and avoid unnecessary copy of empty 'prog' into
unused 'strcut tcf_bpf_cfg old'.

Fixes: f4eaed2 ("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>
  • Loading branch information
Alexei Starovoitov authored and David S. Miller committed Aug 26, 2015
1 parent 3c64562 commit faa54be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/act_bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static int tcf_bpf_init(struct net *net, struct nlattr *nla,
prog = to_bpf(act);
spin_lock_bh(&prog->tcf_lock);

if (ret != ACT_P_CREATED)
if (res != ACT_P_CREATED)
tcf_bpf_prog_fill_cfg(prog, &old);

prog->bpf_ops = cfg.bpf_ops;
Expand Down

0 comments on commit faa54be

Please sign in to comment.