]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix potential memory leaks in session setup
authorPaulo Alcantara <pc@cjr.nz>
Tue, 10 Jan 2023 23:35:46 +0000 (20:35 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:32 +0000 (08:34 +0100)
commitbdd697b741b5c54886e663c7213e8e54c83b90c3
tree49de36c3d060b616ef185a62c02636d62aede7fb
parente86d605e635df49127dc6b30c48abe4c39652517
cifs: fix potential memory leaks in session setup

[ Upstream commit 2fe58d977ee05da5bb89ef5dc4f5bf2dc15db46f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/cifsencrypt.c
fs/cifs/sess.c
fs/cifs/smb2pdu.c