krb5_init_context krb5_parse_name memory leaks

Stephen Ince since at
Fri Nov 14 11:04:33 EST 2008

I do not know if I should post this question here or the general.
I noticed that I have the kfw-3-2-2-final kerberos api has some memory 
leaks. I am running some purify memory profiling tests. Here is what I 

    // memory leak for krb5_parse_name (allocate)
    if (err = krb5_parse_name(krb5->context, username, &krb5->client)){

   if (krb5->client) krb5_free_principal(krb5->context, krb5->client);

[W] MLK: Memory leak of 28 bytes from 1 block allocated in krb5_parse_name 
        Distribution of leaked blocks
                28 bytes from 1 block of 28 bytes (0x003c8af8)
        Allocation location
            malloc         [C:\WINDOWS\SYSTEM32\MSVCR71.DLL]
            krb5_parse_name [C:\OPENLOAD\BIN\KRB5_32.DLL]

    // memory leak for krb5_init_context (allocate)
    if (err = krb5_init_context(&krb5->context)){ // line 92


[W] MLK: Memory leak of 1164 bytes from 1 block allocated in 
krb5_init_secure_context [KRB5_32.DLL]
        Distribution of leaked blocks
              1164 bytes from 1 block of 1164 bytes (0x003c6190)
        Allocation location
            malloc         [C:\WINDOWS\SYSTEM32\MSVCR71.DLL]
            krb5_init_secure_context [C:\OPENLOAD\BIN\KRB5_32.DLL]
            krb5_init      [C:\work\flood_openload\flood_krb5.c:92]

More information about the krbdev mailing list