From: Yan, Zheng Date: Mon, 10 Mar 2014 04:52:07 +0000 (+0800) Subject: nfsd4: fix memory leak in nfsd4_encode_fattr() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=18df11d0eacf67bbcd8dda755b568bbbd7264735;p=linux-beck.git nfsd4: fix memory leak in nfsd4_encode_fattr() fh_put() does not free the temporary file handle. Signed-off-by: Yan, Zheng Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 4c247c1ea5c1..2723c1badd01 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2500,8 +2500,10 @@ out: security_release_secctx(context, contextlen); #endif /* CONFIG_NFSD_V4_SECURITY_LABEL */ kfree(acl); - if (tempfh) + if (tempfh) { fh_put(tempfh); + kfree(tempfh); + } return status; out_nfserr: status = nfserrno(err);