Browse Source

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>
Kinglong Mee 9 years ago
parent
commit
8edf4b0288
1 changed files with 2 additions and 1 deletions
  1. 2 1
      fs/nfsd/nfs4state.c

+ 2 - 1
fs/nfsd/nfs4state.c

@@ -2408,7 +2408,8 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
 	default:				/* checked by xdr code */
 	default:				/* checked by xdr code */
 		WARN_ON_ONCE(1);
 		WARN_ON_ONCE(1);
 	case SP4_SSV:
 	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: */
 	/* Cases below refer to rfc 5661 section 18.35.4: */