diff options
| author | 2026-06-24 09:13:18 +0800 | |
|---|---|---|
| committer | 2026-06-30 21:29:45 -0500 | |
| commit | d4d56b00c7df88cd5751e7415bdfabc9fdbc82a7 (patch) | |
| tree | 0c0f5795c7e04af39cd6e6aefb04b8f22e3b3309 /scripts/Makefile.thinlto | |
| parent | Linux 7.2-rc1 (diff) | |
ksmbd: fix sd_ndr.data memory leak in ksmbd_vfs_set_sd_xattr
ndr_encode_v4_ntacl() allocates sd_ndr.data via kzalloc() at entry.
If any subsequent ndr_write_*() call returns error during encoding,
the allocated sd_ndr.data won't be freed and causes memory leak.
Move kfree(sd_ndr.data) into out label to ensure the buffer gets
released on all success and error return paths.
Signed-off-by: Qiang Liu <liuqiang@kylinos.cn>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
