summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKinglong Mee2014-03-24 04:56:59 +0100
committerJ. Bruce Fields2014-03-29 02:23:40 +0100
commit3f42d2c428c724212c5f4249daea97e254eb0546 (patch)
tree34ffdd877fb5c7a7ce8a0cfeef89e471e47e8b13 /fs
parentSUNRPC: fix memory leak of peer addresses in XPRT (diff)
downloadkernel-qcow2-linux-3f42d2c428c724212c5f4249daea97e254eb0546.tar.gz
kernel-qcow2-linux-3f42d2c428c724212c5f4249daea97e254eb0546.tar.xz
kernel-qcow2-linux-3f42d2c428c724212c5f4249daea97e254eb0546.zip
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>
Diffstat (limited to 'fs')
-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 7415eac36501..5a9588e55f2e 100644
--- a/fs/nfsd/nfs4state.c
+++ b/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: