cifs: fix NULL dereference in smb2_check_message()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 22 Jun 2021 10:59:55 +0000 (13:59 +0300)
committerSteve French <stfrench@microsoft.com>
Wed, 23 Jun 2021 18:04:36 +0000 (13:04 -0500)
commit1689b0b554defd5a7863bbd434ae911b8869504a
treeeca597e9d62614365c4bd55c032372d928e709be
parent0555b221528e9cb11f5766dcdee19c809187e42e
cifs: fix NULL dereference in smb2_check_message()

This code sets "ses" to NULL which will lead to a NULL dereference on
the second iteration through the loop.

Fixes: 85346c17e425 ("cifs: convert list_for_each to entry variant in smb2misc.c")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2misc.c