]> 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)
commit27893dfc1285f80f80f46b3b8c95f5d15d2e66d0
tree97ad5a5c14194969ac11668c55ed0e1754ba3eed
parent3e3761f1ec7df67d88cfca5e2ea98538f529e645
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