summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2016-02-26 15:36:42 +0100
committerJ. Bruce Fields <bfields@redhat.com>2016-03-01 22:06:31 +0100
commit8edf4b028818336ccff7dff5ef60b3d81fac5380 (patch)
tree5748a9a75f0d7dbb733de659d3b9bfa4f910f873 /fs/nfsd/nfs4state.c
parentnfsd4: fix bad bounds checking (diff)
downloadlinux-8edf4b028818336ccff7dff5ef60b3d81fac5380.tar.xz
linux-8edf4b028818336ccff7dff5ef60b3d81fac5380.zip
nfsd: Fix a memory leak when meeting unsupported state_protect_how4
Remember free allocated client when meeting unsupported state protect how. Fixes: 50c7b948adbd ("nfsd: minor consolidation of mach_cred handling code") Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index c484a2b6cd10..9d20c6a54734 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2408,7 +2408,8 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
default: /* checked by xdr code */
WARN_ON_ONCE(1);
case SP4_SSV:
- return nfserr_encr_alg_unsupp;
+ status = nfserr_encr_alg_unsupp;
+ goto out_nolock;
}
/* Cases below refer to rfc 5661 section 18.35.4: */