mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| listmount_test.c | ||
| Makefile | ||
| statmount_test_ns.c | ||
| statmount_test.c | ||
| statmount.h | ||