]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix small mempool leak in SMB2_negotiate()
authorEnzo Matsumiya <ematsumiya@suse.de>
Tue, 30 Aug 2022 22:51:51 +0000 (19:51 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 31 Aug 2022 01:08:13 +0000 (20:08 -0500)
commitde0640dd0d15b739478d9a8c04dafbb2ccc274d8
tree97ad5a5c14194969ac11668c55ed0e1754ba3eed
parentfa992cd6ca911e4bd70e810f8413b70a9b2ee4aa
cifs: fix small mempool leak in SMB2_negotiate()

In some cases of failure (dialect mismatches) in SMB2_negotiate(), after
the request is sent, the checks would return -EIO when they should be
rather setting rc = -EIO and jumping to neg_exit to free the response
buffer from mempool.

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Cc: stable@vger.kernel.org
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.c