]> git.karo-electronics.de Git - linux-beck.git/commitdiff
nfsd: Fix memleak
authormajianpeng <majianpeng@gmail.com>
Tue, 29 Jan 2013 05:16:06 +0000 (13:16 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 5 Feb 2013 14:40:47 +0000 (09:40 -0500)
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>
fs/nfsd/nfs4state.c

index 4db46aa387b7cdd63fc153eeab93d52de015ba97..a6637de7ae13063ea0324529aae979797cf29dae 100644 (file)
@@ -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);
 }