Commit f5f485d8 authored by Paulo Alcantara's avatar Paulo Alcantara Committed by Greg Kroah-Hartman

cifs: Fix memory leak in smb2_set_ea()

commit 6aa0c114 upstream.

This patch fixes a memory leak when doing a setxattr(2) in SMB2+.
Signed-off-by: default avatarPaulo Alcantara <palcantara@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ff533735
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment