mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-15 17:14:00 +08:00
cifsd: fix memleak in ksmbd_vfs_stream_read()
Before ksmbd_vfs_stream_read() return, 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:
parent
113ef68d47
commit
673b9ba7a1
@ -290,6 +290,7 @@ static int ksmbd_vfs_stream_read(struct ksmbd_file *fp, char *buf, loff_t *pos,
|
|||||||
}
|
}
|
||||||
|
|
||||||
memcpy(buf, &stream_buf[*pos], count);
|
memcpy(buf, &stream_buf[*pos], count);
|
||||||
|
kvfree(stream_buf);
|
||||||
return v_len > count ? count : v_len;
|
return v_len > count ? count : v_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user