[krbdev.mit.edu #2722] Outstanding allocation of krb5_copy_principal() after callking krb5_get_init_creds_password

Public Submitter via RT rt-comment at krbdev.mit.edu
Thu Sep 23 16:43:26 EDT 2004


==20711== 28 bytes in 1 blocks are definitely lost in loss record 8 of 10
==20711==    at 0x1B902A90: malloc (vg_replace_malloc.c:131)
==20711==    by 0x13CA8F: krb5_copy_principal (in /usr/lib/libkrb5.so.3.2)
==20711==    by 0x1405B5: (within /usr/lib/libkrb5.so.3.2)
==20711==    by 0x1416BB: krb5_get_init_creds (in /usr/lib/libkrb5.so.3.2)
==20711==    by 0x142837: krb5_get_init_creds_password (in
/usr/lib/libkrb5.so.3.2)


I call get_init_creds_password:

krb5_get_init_creds_password(     ctx,
                                  &m_clientCreds,
                                  clientPrincipal,
                                  (char * )szPassword.c_str(),
                                  NULL, NULL, 0, NULL,
                                  &options ) );

And later I do:
 krb5_free_cred_contents( ctx, &m_clientCreds );
and:
 krb5_free_principal( ctx, clientPrincipal );

I am using valgrind-2.2.0-1 to find this issue.

After talking with Sam Hartman it seems this is happening mainly to me,
and not in the standard kinit code.  I am thinking that some API call's
I've made prior to this one is perhaps setting me up for failure.

I will see if I can hunt it down.


More information about the krb5-bugs mailing list