diff options
author | 2021-05-29 16:20:57 +0800 | |
---|---|---|
committer | 2021-05-31 13:52:59 +0900 | |
commit | 673b9ba7a1404fa5beda936b8ad509b70a516b52 (patch) | |
tree | f7d3bf64bcc26b829c38ef5106bad897021383c5 | |
parent | cifsd: fix memleak in ksmbd_vfs_stream_write() (diff) | |
download | wireguard-linux-673b9ba7a1404fa5beda936b8ad509b70a516b52.tar.xz wireguard-linux-673b9ba7a1404fa5beda936b8ad509b70a516b52.zip |
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>
-rw-r--r-- | fs/cifsd/vfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifsd/vfs.c b/fs/cifsd/vfs.c index e70b67e41cd4..85872416bf9b 100644 --- a/fs/cifsd/vfs.c +++ b/fs/cifsd/vfs.c @@ -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); + kvfree(stream_buf); return v_len > count ? count : v_len; } |