mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
cifsd: fix memleak in ksmbd_vfs_stream_write()
Before assigning wbuf to stream_buf, memory allocate in ksmbd_vfs_getcasexattr() need be freed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
committed by
Namjae Jeon
parent
d7e5852b4d
commit
113ef68d47
@@ -429,6 +429,7 @@ static int ksmbd_vfs_stream_write(struct ksmbd_file *fp, char *buf, loff_t *pos,
|
||||
|
||||
if (v_len > 0)
|
||||
memcpy(wbuf, stream_buf, v_len);
|
||||
kvfree(stream_buf);
|
||||
stream_buf = wbuf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user