aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2014-03-10 00:52:07 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-03-31 17:08:23 -0400
commit18df11d0eacf67bbcd8dda755b568bbbd7264735 (patch)
tree4eb33055d8f96ed72fe2c31a3c1677199de238b5 /fs
parent3064639423c48d6e0eb9ecc27c512a58e38c6c57 (diff)
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')
-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:
2500 security_release_secctx(context, contextlen); 2500 security_release_secctx(context, contextlen);
2501#endif /* CONFIG_NFSD_V4_SECURITY_LABEL */ 2501#endif /* CONFIG_NFSD_V4_SECURITY_LABEL */
2502 kfree(acl); 2502 kfree(acl);
2503 if (tempfh) 2503 if (tempfh) {
2504 fh_put(tempfh); 2504 fh_put(tempfh);
2505 kfree(tempfh);
2506 }
2505 return status; 2507 return status;
2506out_nfserr: 2508out_nfserr:
2507 status = nfserrno(err); 2509 status = nfserrno(err);