aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamjae Jeon <[email protected]>2021-05-10 09:08:19 +0900
committerSteve French <[email protected]>2021-05-10 19:15:49 -0500
commitbcd62a368314deeea8bd0823399b649a236b7d5b (patch)
tree0a89eae3ec609bb7b19ae136e22dcc18a7d60f01
parent5a0ca7700591a5275875920cf0c3113435e4b6f7 (diff)
cifsd: fix invalid memory access in smb2_write()
Add missing fp initialzation to prevent invalid memory access in smb2_write(). Reported-by: Coverity Scan <[email protected]> Signed-off-by: Namjae Jeon <[email protected]> Signed-off-by: Steve French <[email protected]>
-rw-r--r--fs/cifsd/smb2pdu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifsd/smb2pdu.c b/fs/cifsd/smb2pdu.c
index d07d7c45f899..18de8a763209 100644
--- a/fs/cifsd/smb2pdu.c
+++ b/fs/cifsd/smb2pdu.c
@@ -6078,7 +6078,7 @@ int smb2_write(struct ksmbd_work *work)
{
struct smb2_write_req *req;
struct smb2_write_rsp *rsp, *rsp_org;
- struct ksmbd_file *fp;
+ struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;