Ronnie Sahlberg 5716a37020 cifs: fix memory leak in smb2_copychunk_range
commit d201d7631ca170b038e7f8921120d05eec70d7c5 upstream.

When using smb2_copychunk_range() for large ranges we will
run through several iterations of a loop calling SMB2_ioctl()
but never actually free the returned buffer except for the final
iteration.
This leads to memory leaks everytime a large copychunk is requested.

Fixes: 9bf0c9cd4314 ("CIFS: Fix SMB2/SMB3 Copy offload support (refcopy) for large files")
Cc: <stable@vger.kernel.org>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-26 11:29:06 +02:00
..
2020-10-29 09:05:32 +01:00
2016-10-13 19:48:11 -05:00
2016-09-16 12:44:21 +02:00
2017-05-20 14:28:40 +02:00
2018-09-05 09:20:05 +02:00
2017-05-08 07:47:55 +02:00
2017-05-08 07:47:55 +02:00
2019-10-05 12:30:36 +02:00