]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nfsd: Fix memleak
authormajianpeng <majianpeng@gmail.com>
Tue, 29 Jan 2013 05:16:06 +0000 (13:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Mar 2013 22:03:37 +0000 (06:03 +0800)
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>
fs/nfsd/nfs4state.c

index ac8ed96c41994467512a632db89c8bed9bff6b27..a8309c688f0764b51e73eae7c729eec1f0714a3f 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);
 }