linux/fs/smb
Zilin Guan d026f47db6 ksmbd: Fix memory leak in get_file_all_info()
[ Upstream commit 0c56693b06 ]

In get_file_all_info(), if vfs_getattr() fails, the function returns
immediately without freeing the allocated filename, leading to a memory
leak.

Fix this by freeing the filename before returning in this error case.

Fixes: 5614c8c487 ("ksmbd: replace generic_fillattr with vfs_getattr")
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-01-08 10:16:51 +01:00
..
client cifs: Fix memory and information leak in smb3_reconfigure() 2026-01-02 12:57:04 +01:00
common smb: smbdirect: introduce SMBDIRECT_CHECK_STATUS_{WARN,DISCONNECT}() 2025-12-18 14:03:28 +01:00
server ksmbd: Fix memory leak in get_file_all_info() 2026-01-08 10:16:51 +01:00
Kconfig smb: move client and server files to common directory fs/smb 2023-05-24 16:29:21 -05:00
Makefile smb: move client and server files to common directory fs/smb 2023-05-24 16:29:21 -05:00