diff options
| author | Qiang Liu <liuqiang@kylinos.cn> | 2026-06-24 09:13:18 +0800 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-06-30 21:29:45 -0500 |
| commit | d4d56b00c7df88cd5751e7415bdfabc9fdbc82a7 (patch) | |
| tree | 0c0f5795c7e04af39cd6e6aefb04b8f22e3b3309 /lib/raid/raid6/git@git.tavy.me:linux-stable.git | |
| parent | dc59e4fea9d83f03bad6bddf3fa2e52491777482 (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 'lib/raid/raid6/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
