Browse Source

NFSD: Using free_conn free connection

Connection from alloc_conn must be freed through free_conn,
otherwise, the reference of svc_xprt will never be put.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Kinglong Mee 11 years ago
parent
commit
3f42d2c428
1 changed files with 2 additions and 1 deletions
  1. 2 1
      fs/nfsd/nfs4state.c

+ 2 - 1
fs/nfsd/nfs4state.c

@@ -2287,7 +2287,8 @@ out:
 	if (!list_empty(&clp->cl_revoked))
 		seq->status_flags |= SEQ4_STATUS_RECALLABLE_STATE_REVOKED;
 out_no_session:
-	kfree(conn);
+	if (conn)
+		free_conn(conn);
 	spin_unlock(&nn->client_lock);
 	return status;
 out_put_session: