aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authormajianpeng <majianpeng@gmail.com>2013-01-29 00:16:06 -0500
committerJ. Bruce Fields <bfields@redhat.com>2013-02-05 09:40:47 -0500
commit2d32b29a1c2830f7c42caa8258c714acd983961f (patch)
treebbf4c3bfc2599c0382433d3e4ef55ec926957fc2 /fs/nfsd
parentb4e7f2c9450968303d24b48fec9da8abebcc0036 (diff)
nfsd: Fix memleak
When free nfs-client, it must free the ->cl_stateids. Cc: stable@kernel.org Signed-off-by: Jianpeng Ma <majianpeng@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 4db46aa387b7..a6637de7ae13 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1060,6 +1060,8 @@ free_client(struct nfs4_client *clp)
1060 } 1060 }
1061 free_svc_cred(&clp->cl_cred); 1061 free_svc_cred(&clp->cl_cred);
1062 kfree(clp->cl_name.data); 1062 kfree(clp->cl_name.data);
1063 idr_remove_all(&clp->cl_stateids);
1064 idr_destroy(&clp->cl_stateids);
1063 kfree(clp); 1065 kfree(clp);
1064} 1066}
1065 1067