[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181217174345.l4gxjfpiylk6yb6e@kafai-mbp.dhcp.thefacebook.com>
Date: Mon, 17 Dec 2018 17:43:47 +0000
From: Martin Lau <kafai@...com>
To: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
CC: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] bpf: libbpf: fix memleak by freeing line_info
On Mon, Dec 17, 2018 at 04:57:50PM +0900, Prashant Bhole wrote:
> This patch fixes a memory leak in libbpf by freeing up line_info
> member of struct bpf_program while unloading a program.
>
> Fixes: 3d65014146c6 ("bpf: libbpf: Add btf_line_info support to libbpf")
> Signed-off-by: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
> ---
> tools/lib/bpf/libbpf.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index e2bc75ee1614..169e347c76f6 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -266,6 +266,7 @@ void bpf_program__unload(struct bpf_program *prog)
>
> zclose(prog->btf_fd);
> zfree(&prog->func_info);
> + zfree(&prog->line_info);
Thanks for the fix!
Acked-by: Martin KaFai Lau <kafai@...com>
Powered by blists - more mailing lists