From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:47848 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388985AbeGJSdp (ORCPT ); Tue, 10 Jul 2018 14:33:45 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paulo Alcantara , Steve French , Aurelien Aptel Subject: [PATCH 4.14 10/53] cifs: Fix memory leak in smb2_set_ea() Date: Tue, 10 Jul 2018 20:24:46 +0200 Message-Id: <20180710182459.496570516@linuxfoundation.org> In-Reply-To: <20180710182458.736721865@linuxfoundation.org> References: <20180710182458.736721865@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: stable-owner@vger.kernel.org List-ID: 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paulo Alcantara commit 6aa0c114eceec8cc61715f74a4ce91b048d7561c upstream. This patch fixes a memory leak when doing a setxattr(2) in SMB2+. Signed-off-by: Paulo Alcantara Cc: stable@vger.kernel.org Signed-off-by: Steve French Reviewed-by: Aurelien Aptel Signed-off-by: Greg Kroah-Hartman --- fs/cifs/smb2ops.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -636,6 +636,8 @@ smb2_set_ea(const unsigned int xid, stru 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;