cifs: fix dereference on ses before it is null checked
authorColin Ian King <colin.king@canonical.com>
Mon, 2 Sep 2019 15:10:59 +0000 (16:10 +0100)
committerSteve French <stfrench@microsoft.com>
Mon, 16 Sep 2019 16:43:37 +0000 (11:43 -0500)
commitac6ad7a8c9f6f1fd43262b2273a45ec1fdd3a981
treeea53f7e554c5307b008659ce2be64019510e79fe
parentafe6f65353b644f55875d42d812ffe87f1887d68
cifs: fix dereference on ses before it is null checked

The assignment of pointer server dereferences pointer ses, however,
this dereference occurs before ses is null checked and hence we
have a potential null pointer dereference.  Fix this by only
dereferencing ses after it has been null checked.

Addresses-Coverity: ("Dereference before null check")
Fixes: 2808c6639104 ("cifs: add new debugging macro cifs_server_dbg")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.c
fs/cifs/transport.c