* [PATCH bpf-next] selftests/bpf: fix file resource leak
@ 2018-10-18 15:18 Peng Hao
2018-10-18 20:14 ` Daniel Borkmann
0 siblings, 1 reply; 2+ messages in thread
From: Peng Hao @ 2018-10-18 15:18 UTC (permalink / raw)
To: ast, daniel, shuah; +Cc: netdev, linux-kselftest, linux-kernel, Peng Hao
FILE pointer variable f is opened but never closed.
Signed-off-by:Peng Hao <peng.hao2@zte.com.cn>
---
tools/testing/selftests/bpf/trace_helpers.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/trace_helpers.c b/tools/testing/selftests/bpf/trace_helpers.c
index cabe2a3..a3d1dac 100644
--- a/tools/testing/selftests/bpf/trace_helpers.c
+++ b/tools/testing/selftests/bpf/trace_helpers.c
@@ -41,6 +41,7 @@ int load_kallsyms(void)
syms[i].name = strdup(func);
i++;
}
+ fclose(f);
sym_cnt = i;
qsort(syms, sym_cnt, sizeof(struct ksym), ksym_cmp);
return 0;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: fix file resource leak
2018-10-18 15:18 [PATCH bpf-next] selftests/bpf: fix file resource leak Peng Hao
@ 2018-10-18 20:14 ` Daniel Borkmann
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2018-10-18 20:14 UTC (permalink / raw)
To: Peng Hao, ast, shuah; +Cc: netdev, linux-kselftest, linux-kernel
On 10/18/2018 05:18 PM, Peng Hao wrote:
> FILE pointer variable f is opened but never closed.
>
> Signed-off-by:Peng Hao <peng.hao2@zte.com.cn>
Applied to bpf-next, thanks Peng!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-18 20:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 15:18 [PATCH bpf-next] selftests/bpf: fix file resource leak Peng Hao
2018-10-18 20:14 ` Daniel Borkmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).