fs/cifs: fix uninitialised variable warnings
authorGarry McNulty <garrmcnu@gmail.com>
Wed, 3 Oct 2018 19:51:21 +0000 (20:51 +0100)
committerSteve French <stfrench@microsoft.com>
Wed, 24 Oct 2018 02:16:05 +0000 (21:16 -0500)
commitef2298a06d012973bbc592b86fe5ff730d4d0c63
treef6fb7f0d26271f2febe0bed3b13a9e941705b2f6
parent179e44d49c2f6f4e90479f0a98d896e415742c96
fs/cifs: fix uninitialised variable warnings

In some error conditions, resp_buftype can be passed uninitialised to
free_rsp_buf(), potentially resulting in a spurious debug message.
If resp_buftype randomly had the value 1 (CIFS_SMALL_BUFFER) then this
would log a debug message.
The rsp pointer is initialised to NULL so there is no other side-effect.

Detected by CoverityScan, CID 1438585 ("Uninitialized scalar variable")
Detected by CoverityScan, CID 1438667 ("Uninitialized scalar variable")
Detected by CoverityScan, CID 1438764 ("Uninitialized scalar variable")

Signed-off-by: Garry McNulty <garrmcnu@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
fs/cifs/smb2pdu.c