summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMalaya Kumar Rout <malayarout91@gmail.com>2026-07-04 17:34:36 +0530
committerChristian Brauner <brauner@kernel.org>2026-07-31 10:09:06 +0200
commit8c8fe5c77b604ceb9ce7be1cd5932031f500dda2 (patch)
tree79313635de5ba88d11cd1224119522731277fb03 /tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git
parent38b4ee06d15a90e53969016c8042c12a0a4b4813 (diff)
selftests/statmount: Fix file descriptor leak in setup_namespace
In setup_namespace(), f_mountinfo is opened with fopen() at line 115 but is never closed. Multiple ksft_exit_fail_msg() calls exit the program without closing this file descriptor, and the cleanup_namespace() function registered with atexit() also doesn't close it. Add fclose(f_mountinfo) in cleanup_namespace() to ensure the file descriptor is properly closed on both normal and error exit paths, since cleanup_namespace() is already registered as an atexit handler. Signed-off-by: Malaya Kumar Rout <malayarout91@gmail.com> Link: https://patch.msgid.link/20260704120437.99851-1-malayarout91@gmail.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions