mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 23:20:05 +00:00
cifs: fix memory leak in SMB2_read
Commit 088aaf17aa79300cab14dbee2569c58cfafd7d6e 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>
This commit is contained in:
parent
ba25b50d58
commit
05fd5c2c61
@ -3466,6 +3466,7 @@ SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,
|
||||
io_parms->tcon->tid, ses->Suid,
|
||||
io_parms->offset, 0);
|
||||
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…
x
Reference in New Issue
Block a user