]> 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)
commite0bba7566b386511b8acc3af136e8be90165f194
tree49de36c3d060b616ef185a62c02636d62aede7fb
parent6ad5dc901506f5d53372dfc99c07242a541a597d
cifs: fix potential memory leaks in session setup

[ Upstream commit c0c2828971eb3b5614504e50cc8a54dba5272c32 ]

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