aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-09 15:41:42 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:33 -0400
commit3ab9bb7243489f9db3abf3d05521ddfc6b184c0a (patch)
tree05476c58c87c5578354ab8a3befcb7316c9ef9bc /include/linux/sunrpc
parent03a1256f06cf1f58e33971fb4a524479e75c200e (diff)
SUNRPC: Fix a memory leak in the auth credcache code
The leak only affects the RPCSEC_GSS caches, since they are the only ones that are dynamically allocated... Rename the existing rpcauth_free_credcache() to rpcauth_clear_credcache() in order to better describe its role, then add a new function rpcauth_destroy_credcache() that actually frees the cache in addition to clearing it out. Also move the call to destroy the credcache in gss_destroy() to come before the rpc upcall pipe is unlinked. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/auth.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index 8ef27afeea73..3972b8414c88 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -143,7 +143,8 @@ int rpcauth_refreshcred(struct rpc_task *);
143void rpcauth_invalcred(struct rpc_task *); 143void rpcauth_invalcred(struct rpc_task *);
144int rpcauth_uptodatecred(struct rpc_task *); 144int rpcauth_uptodatecred(struct rpc_task *);
145int rpcauth_init_credcache(struct rpc_auth *, unsigned long); 145int rpcauth_init_credcache(struct rpc_auth *, unsigned long);
146void rpcauth_free_credcache(struct rpc_auth *); 146void rpcauth_destroy_credcache(struct rpc_auth *);
147void rpcauth_clear_credcache(struct rpc_cred_cache *);
147 148
148static inline 149static inline
149struct rpc_cred * get_rpccred(struct rpc_cred *cred) 150struct rpc_cred * get_rpccred(struct rpc_cred *cred)