diff options
author | Paulo Alcantara <paulo@paulo.ac> | 2018-07-04 20:16:16 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-07-05 21:48:24 +0300 |
commit | 6aa0c114eceec8cc61715f74a4ce91b048d7561c (patch) | |
tree | dbcc1f80f7c55ef5aa47504c8872b0813ccf23f8 /fs | |
parent | 81f39f951b8098b1c59b01ad10d06d7dc01c7019 (diff) | |
download | linux-6aa0c114eceec8cc61715f74a4ce91b048d7561c.tar.xz |
cifs: Fix memory leak in smb2_set_ea()
This patch fixes a memory leak when doing a setxattr(2) in SMB2+.
Signed-off-by: Paulo Alcantara <palcantara@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/smb2ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 04578f6e306b..1d5985bd760b 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -856,6 +856,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, rc = SMB2_set_ea(xid, tcon, fid.persistent_fid, fid.volatile_fid, ea, len); + kfree(ea); + SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); return rc; |