diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2014-03-10 05:52:07 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-03-31 23:08:23 +0200 |
commit | 18df11d0eacf67bbcd8dda755b568bbbd7264735 (patch) | |
tree | 4eb33055d8f96ed72fe2c31a3c1677199de238b5 /fs | |
parent | nfsd: check passed socket's net matches NFSd superblock's one (diff) | |
download | linux-18df11d0eacf67bbcd8dda755b568bbbd7264735.tar.xz linux-18df11d0eacf67bbcd8dda755b568bbbd7264735.zip |
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.c | 4 |
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); |