From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ronnie Sahlberg Subject: [PATCH 04/12] cifs: initialize rsp_iov in SMB2_query_info Date: Wed, 11 Oct 2017 12:59:19 +1100 Message-ID: <20171011015927.7669-5-lsahlber@redhat.com> References: <20171011015927.7669-1-lsahlber@redhat.com> Cc: Steve French To: linux-cifs Return-path: In-Reply-To: <20171011015927.7669-1-lsahlber-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Or else we might call free_rsp_buf() on an uninitialized pointer if SendReceive2() failed Signed-off-by: Ronnie Sahlberg --- fs/cifs/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index acadbdbfc8cb..97dc913b8dd7 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -2170,9 +2170,9 @@ query_info(const unsigned int xid, struct cifs_tcon *tcon, u32 *dlen) { struct smb2_query_info_req *req; - struct smb2_query_info_rsp *rsp = NULL; + struct smb2_query_info_rsp *rsp; struct kvec iov[2]; - struct kvec rsp_iov; + struct kvec rsp_iov = { NULL, 0 }; int rc = 0; int resp_buftype; struct cifs_ses *ses = tcon->ses; -- 2.13.3