mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
cifs: Fix memory leak in smb2_set_ea()
commit 6aa0c114ec upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ff533735af
commit
f5f485d888
@@ -636,6 +636,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;
|
||||
|
||||
Reference in New Issue
Block a user