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]
Message-Id: <20250905091647.1170433-1-zhouyuhang1010@163.com>
Date: Fri,  5 Sep 2025 17:16:47 +0800
From: zhouyuhang <zhouyuhang1010@....com>
To: brauner@...nel.org,
	shuah@...nel.org
Cc: linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org,
	Zhou Yuhang <zhouyuhang@...inos.cn>
Subject: [PATCH] selftests: pid_namespace: add the missing close()

From: Zhou Yuhang <zhouyuhang@...inos.cn>

Add the missing close() in the pid_max_cb() function.

Signed-off-by: Zhou Yuhang <zhouyuhang@...inos.cn>
---
 tools/testing/selftests/pid_namespace/pid_max.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/pid_namespace/pid_max.c b/tools/testing/selftests/pid_namespace/pid_max.c
index 96f274f0582b..41f8b943bc96 100644
--- a/tools/testing/selftests/pid_namespace/pid_max.c
+++ b/tools/testing/selftests/pid_namespace/pid_max.c
@@ -61,6 +61,7 @@ static int pid_max_cb(void *data)
 	}
 
 	ret = write(fd, "500", sizeof("500") - 1);
+	close(fd);
 	if (ret < 0) {
 		fprintf(stderr, "%m - Failed to write pid_max\n");
 		return -1;
-- 
2.33.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ