[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191116154113.7417-81-sashal@kernel.org>
Date: Sat, 16 Nov 2019 10:38:36 -0500
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Peng Hao <peng.hao2@....com.cn>,
Daniel Borkmann <daniel@...earbox.net>,
Sasha Levin <sashal@...nel.org>,
linux-kselftest@...r.kernel.org, netdev@...r.kernel.org,
bpf@...r.kernel.org
Subject: [PATCH AUTOSEL 4.19 081/237] selftests/bpf: fix file resource leak in load_kallsyms
From: Peng Hao <peng.hao2@....com.cn>
[ Upstream commit 1bd70d2eba9d90eb787634361f0f6fa2c86b3f6d ]
FILE pointer variable f is opened but never closed.
Signed-off-by: Peng Hao <peng.hao2@....com.cn>
Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
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 cf156b3536798..82922f13dcd3a 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;
--
2.20.1
Powered by blists - more mailing lists