Re: [PATCH] bpf: fix mem leak in error path of lwt bpf setup

2018-05-21 Thread Daniel Borkmann
On 05/21/2018 07:44 PM, Martin KaFai Lau wrote: > On Sun, May 20, 2018 at 02:08:57PM +0100, Mathieu Xhonneux wrote: >> In bpf_parse_prog, if bpf_prog_get_type fails, the function is >> immediately terminated without freeing the previously allocated >> prog->name. >> This patch adds a kfree before t

Re: [PATCH] bpf: fix mem leak in error path of lwt bpf setup

2018-05-21 Thread Martin KaFai Lau
On Sun, May 20, 2018 at 02:08:57PM +0100, Mathieu Xhonneux wrote: > In bpf_parse_prog, if bpf_prog_get_type fails, the function is > immediately terminated without freeing the previously allocated > prog->name. > This patch adds a kfree before the return. > > Signed-off-by: Mathieu Xhonneux > ---

[PATCH] bpf: fix mem leak in error path of lwt bpf setup

2018-05-20 Thread Mathieu Xhonneux
In bpf_parse_prog, if bpf_prog_get_type fails, the function is immediately terminated without freeing the previously allocated prog->name. This patch adds a kfree before the return. Signed-off-by: Mathieu Xhonneux --- net/core/lwt_bpf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) d