cifs: fix potential memory leaks in session setup
authorPaulo Alcantara <pc@cjr.nz>
Tue, 10 Jan 2023 23:35:46 +0000 (20:35 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 11 Jan 2023 05:24:37 +0000 (23:24 -0600)
commit2fe58d977ee05da5bb89ef5dc4f5bf2dc15db46f
tree762d57d17801fac74445c5a8a19915d3898fdc5d
parent22aeb01db7080e18c6aeb4361cc2556c9887099a
cifs: fix potential memory leaks in session setup

Make sure to free cifs_ses::auth_key.response before allocating it as
we might end up leaking memory in reconnect or mounting.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsencrypt.c
fs/cifs/sess.c
fs/cifs/smb2pdu.c