* [PATCH] samples/bpf:fix fout leak
@ 2023-04-11 8:43 Hao Zeng
2023-04-13 13:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Hao Zeng @ 2023-04-11 8:43 UTC (permalink / raw)
To: ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
kpsingh, sdf, haoluo, jolsa, bpf
Cc: linux-kernel, Hao Zeng
Fix fout fopen but not fclose
Signed-off-by: Hao Zeng <zenghao@kylinos.cn>
---
samples/bpf/hbm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/samples/bpf/hbm.c b/samples/bpf/hbm.c
index 516fbac28b71..7f89700a17b6 100644
--- a/samples/bpf/hbm.c
+++ b/samples/bpf/hbm.c
@@ -315,6 +315,7 @@ static int run_bpf_prog(char *prog, int cg_id)
fout = fopen(fname, "w");
fprintf(fout, "id:%d\n", cg_id);
fprintf(fout, "ERROR: Could not lookup queue_stats\n");
+ fclose(fout);
} else if (stats_flag && qstats.lastPacketTime >
qstats.firstPacketTime) {
long long delta_us = (qstats.lastPacketTime -
--
2.37.2
No virus found
Checked by Hillstone Network AntiVirus
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] samples/bpf:fix fout leak
2023-04-11 8:43 [PATCH] samples/bpf:fix fout leak Hao Zeng
@ 2023-04-13 13:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-13 13:10 UTC (permalink / raw)
To: Hao Zeng
Cc: ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
kpsingh, sdf, haoluo, jolsa, bpf, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Tue, 11 Apr 2023 16:43:49 +0800 you wrote:
> Fix fout fopen but not fclose
>
> Signed-off-by: Hao Zeng <zenghao@kylinos.cn>
> ---
> samples/bpf/hbm.c | 1 +
> 1 file changed, 1 insertion(+)
Here is the summary with links:
- samples/bpf:fix fout leak
https://git.kernel.org/bpf/bpf-next/c/23acb14af191
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-13 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-11 8:43 [PATCH] samples/bpf:fix fout leak Hao Zeng
2023-04-13 13:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox