summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2014-03-10 12:52:07 +0800
committerJ. Bruce Fields <bfields@redhat.com>2014-03-31 17:08:23 -0400
commit18df11d0eacf67bbcd8dda755b568bbbd7264735 (patch)
tree4eb33055d8f96ed72fe2c31a3c1677199de238b5 /fs/nfsd/nfs4xdr.c
parent3064639423c48d6e0eb9ecc27c512a58e38c6c57 (diff)
downloadlinux-18df11d0eacf67bbcd8dda755b568bbbd7264735.tar.bz2
nfsd4: fix memory leak in nfsd4_encode_fattr()
fh_put() does not free the temporary file handle. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c4
1 files changed, 3 insertions, 1 deletions
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);