summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authormajianpeng <majianpeng@gmail.com>2013-01-29 09:16:06 +0400
committerBen Hutchings <ben@decadent.org.uk>2013-03-06 07:23:49 +0400
commit35ad1797ad99b8e73758c805803021cbda799dcb (patch)
tree813948fe49b94788075937b6c03cfc315cb62769 /fs/nfsd
parentd03659265edc9c622ecbdb94999a27f868a60a4b (diff)
downloadlinux-35ad1797ad99b8e73758c805803021cbda799dcb.tar.xz
nfsd: Fix memleak
commit 2d32b29a1c2830f7c42caa8258c714acd983961f upstream. When free nfs-client, it must free the ->cl_stateids. Signed-off-by: Jianpeng Ma <majianpeng@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
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 8b197d2b8443..7d189dc3d767 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1009,6 +1009,8 @@ free_client(struct nfs4_client *clp)
put_group_info(clp->cl_cred.cr_group_info);
kfree(clp->cl_principal);
kfree(clp->cl_name.data);
+ idr_remove_all(&clp->cl_stateids);
+ idr_destroy(&clp->cl_stateids);
kfree(clp);
}