heimdal-discuss  

Re: gsskrb5_accept_delegated_token leaks a ccache

Love Hörnquist Åstrand
Wed, 07 Feb 2007 15:17:18 -0800

6 feb 2007 kl. 15.14 skrev Michael B Allen:

On Mon, 5 Feb 2007 22:59:34 -0500
Michael B Allen <[EMAIL PROTECTED]> wrote:
If I simply remove the ccache = NULL line in
gsskrb5_accept_delegated_token the leak is gone, delegation works fine
and otherwise my application seems heathy.

Correction, this breaks trying to initiate with the delegated
cred. Apparently that ccache does need to hang around. I will investigate
further ...

The following works for me but I find it hard to believe the code removed
isn't important.

The code tries to get a new reference to the credential cache to avoid
having the caller to keep a open reference to the cache.

With you patch the accept_delegated_token code will close "id"
and the handle will contain a pointer to free-ed memory.

I'm sure you are right that there is a memory leak, but I can't figure out why.

Love