nfsd: Fix a memory leak when meeting unsupported state_protect_how4
authorKinglong Mee <kinglongmee@gmail.com>
Fri, 26 Feb 2016 14:36:42 +0000 (22:36 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 1 Mar 2016 21:06:31 +0000 (13:06 -0800)
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>
fs/nfsd/nfs4state.c

index c484a2b6cd109e985d9ea46cd59772146e3e3e3c..9d20c6a54734f6065ff3ffe756966464ba7c1b13 100644 (file)
@@ -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: */