Message ID | 20171011015927.7669-8-lsahlber@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 96a6ed9c86d4..21ffeb5f5e4b 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -2862,9 +2862,9 @@ SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms, { int rc = 0; struct smb2_write_req *req = NULL; - struct smb2_write_rsp *rsp = NULL; + struct smb2_write_rsp *rsp; int resp_buftype; - struct kvec rsp_iov; + struct kvec rsp_iov = { NULL, 0 }; int flags = 0; *nbytes = 0;
Or else we might call free_rsp_buf() on an uninitialized pointer if SendReceive2() failed Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> --- fs/cifs/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)