projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b55cbc8
)
selftests/bpf: fix file resource leak in load_kallsyms
author
Peng Hao
<peng.hao2@zte.com.cn>
Thu, 18 Oct 2018 15:18:36 +0000
(23:18 +0800)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Thu, 18 Oct 2018 20:13:30 +0000
(22:13 +0200)
FILE pointer variable f is opened but never closed.
Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/trace_helpers.c
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/bpf/trace_helpers.c
b/tools/testing/selftests/bpf/trace_helpers.c
index cabe2a3a3b30076f3bcd282758e43774bde542ec..a3d1dace4a7562056c00fe9800890cfb71653fc1 100644
(file)
--- 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;