mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
selftests/bpf: fix file resource leak in load_kallsyms
[ Upstream commit 1bd70d2eba ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
56b8b18321
commit
a0ec7f6eab
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user