From: majianpeng Date: Tue, 29 Jan 2013 05:16:06 +0000 (+0800) Subject: nfsd: Fix memleak X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=2d32b29a1c2830f7c42caa8258c714acd983961f;p=deliverable%2Flinux.git nfsd: Fix memleak When free nfs-client, it must free the ->cl_stateids. Cc: stable@kernel.org Signed-off-by: Jianpeng Ma Signed-off-by: J. Bruce Fields --- 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) } free_svc_cred(&clp->cl_cred); kfree(clp->cl_name.data); + idr_remove_all(&clp->cl_stateids); + idr_destroy(&clp->cl_stateids); kfree(clp); }