]> err.no Git - linux-2.6/commit
SUNRPC: Fix a memory leak in the auth credcache code
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 9 Jun 2007 19:41:42 +0000 (15:41 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Jul 2007 03:40:33 +0000 (23:40 -0400)
commit3ab9bb7243489f9db3abf3d05521ddfc6b184c0a
tree05476c58c87c5578354ab8a3befcb7316c9ef9bc
parent03a1256f06cf1f58e33971fb4a524479e75c200e
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>
include/linux/sunrpc/auth.h
net/sunrpc/auth.c
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/auth_unix.c
net/sunrpc/sunrpc_syms.c