lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 29 Jun 2023 09:34:44 +0800
From:   Hu Xiaoying <huxiaoying@...inos.cn>
To:     linux-kernel@...r.kernel.org
Cc:     ast@...nel.org, daniel@...earbox.net,
        Hu Xiaoying <huxiaoying@...inos.cn>
Subject: [PATCH] samples/bpf: Fix outf leak in hbm's read_trace_pipe2

Fix outf being fopen'ed but then not subsequently fclose'd. In the affected
branch, outf is otherwise going out of scope.
---
 samples/bpf/hbm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/samples/bpf/hbm.c b/samples/bpf/hbm.c
index bf66277115e2..e28370741d9b 100644
--- a/samples/bpf/hbm.c
+++ b/samples/bpf/hbm.c
@@ -105,6 +105,8 @@ static void read_trace_pipe2(void)
 			}
 		}
 	}
+
+	fclose(outf);
 }
 
 static void do_error(char *msg, bool errno_flag)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ