diff options
author | Ronnie Sahlberg <lsahlber@redhat.com> | 2019-04-23 09:39:45 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-04-24 20:33:59 +0300 |
commit | 05fd5c2c61732152a6bddc318aae62d7e436629b (patch) | |
tree | 440d07cdc7fcff71f9c0368c8bedfccc525ae5c1 /fs/cifs/smb2pdu.c | |
parent | ba25b50d582ff6c6021eee80824134aeb9ab8785 (diff) | |
download | linux-05fd5c2c61732152a6bddc318aae62d7e436629b.tar.xz |
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>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index b8f7262ac354..a37774a55f3a 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -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, |