bpf: fix memory leak in bpf_lwt_xmit_reroute
On error the skb should be freed. Tested with diff/steps provided by David Ahern. v2: surface routing errors to the user instead of a generic EINVAL, as suggested by David Ahern. Reported-by:David Ahern <dsahern@gmail.com> Fixes: 3bd0b152 ("bpf: add handling of BPF_LWT_REROUTE to lwt_bpf.c") Signed-off-by:
Peter Oskolkov <posk@google.com> Reviewed-by:
David Ahern <dsahern@gmail.com> Signed-off-by:
Alexei Starovoitov <ast@kernel.org>
Showing
Please register or sign in to comment