Skip to content

Commit

Permalink
nfsd: Fix memleak
Browse files Browse the repository at this point in the history
When free nfs-client, it must free the ->cl_stateids.

Cc: [email protected]
Signed-off-by: Jianpeng Ma <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
majianpeng authored and J. Bruce Fields committed Feb 5, 2013
1 parent b4e7f2c commit 2d32b29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 2d32b29

Please sign in to comment.