commit | 2d32b29a1c2830f7c42caa8258c714acd983961f | [log] [tgz] |
---|---|---|
author | majianpeng <majianpeng@gmail.com> | Tue Jan 29 13:16:06 2013 +0800 |
committer | J. Bruce Fields <bfields@redhat.com> | Tue Feb 05 09:40:47 2013 -0500 |
tree | bbf4c3bfc2599c0382433d3e4ef55ec926957fc2 | |
parent | b4e7f2c9450968303d24b48fec9da8abebcc0036 [diff] [blame] |
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>
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 4db46aa..a6637de 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c
@@ -1060,6 +1060,8 @@ } free_svc_cred(&clp->cl_cred); kfree(clp->cl_name.data); + idr_remove_all(&clp->cl_stateids); + idr_destroy(&clp->cl_stateids); kfree(clp); }