]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sunrpc/auth_unix.c
SUNRPC: Fix a memory leak in the auth credcache code
[linux-2.6-omap-h63xx.git] / net / sunrpc / auth_unix.c
index 4e7733aee36e8f42dafa178cceabdfa028a3dbae..5622783011a4824eea6045fbce39a4a1e57e025f 100644 (file)
@@ -50,7 +50,7 @@ static void
 unx_destroy(struct rpc_auth *auth)
 {
        dprintk("RPC:       destroying UNIX authenticator %p\n", auth);
-       rpcauth_free_credcache(auth);
+       rpcauth_clear_credcache(auth->au_credcache);
 }
 
 /*
@@ -92,6 +92,7 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
                if (i < NFS_NGROUPS)
                  cred->uc_gids[i] = NOGROUP;
        }
+       cred->uc_base.cr_auth = &unix_auth;
        cred->uc_base.cr_ops = &unix_credops;
 
        return (struct rpc_cred *) cred;