mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
cifs: fix memory leak in SMB2_read
commit05fd5c2c61
upstream. Commit088aaf17aa
introduced a leak where if SMB2_read() returned an error we would return without freeing the request buffer. Cc: Stable <stable@vger.kernel.org> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
15e9783915
commit
d5bf783a09
1 changed files with 1 additions and 0 deletions
|
@ -3285,6 +3285,7 @@ SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,
|
|||
rc);
|
||||
}
|
||||
free_rsp_buf(resp_buftype, rsp_iov.iov_base);
|
||||
cifs_small_buf_release(req);
|
||||
return rc == -ENODATA ? 0 : rc;
|
||||
} else
|
||||
trace_smb3_read_done(xid, req->PersistentFileId,
|
||||
|
|
Loading…
Reference in a new issue