aboutsummaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authormajianpeng <majianpeng@gmail.com>2013-01-29 13:16:06 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-04 06:06:42 +0800
commit5623a7cc4e3f0f461586b10b78967bb5f53fa096 (patch)
tree31c046702f80af64ae7f5a5086337be12eeb492d /fs/nfsd
parent4234fb29a8c0a5c5eaee6de38fe3cba674daecd0 (diff)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 537731e4c16..abd785e5fd2 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1053,6 +1053,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);
}