Subject: | Memory leak in krb5_cc_resolve (double malloc of pfx) |
There is a 7 byte memory leak (strlen("MEMORY")+1) when passing a cache
name that is formatted with the "type:" field.
I was doing this:
cc_resolve(ctx, "/tmp/myfile.cache", &cache)
and all was fine. But then I decided that a MEMORY cache best fit my
needs, so I tried:
cc_resolve(ctx, "MEMORY:/tmp/myfile.cache", &cache)
And found a leak with valgrind. Its the size of the type string, I then
found the dual allocation.
ccbase.c:110 allocates 7 bytes of memory
ccbase.c:127 allocates over the first allocation (in the case where my
prefix length is greater then 1).
name that is formatted with the "type:" field.
I was doing this:
cc_resolve(ctx, "/tmp/myfile.cache", &cache)
and all was fine. But then I decided that a MEMORY cache best fit my
needs, so I tried:
cc_resolve(ctx, "MEMORY:/tmp/myfile.cache", &cache)
And found a leak with valgrind. Its the size of the type string, I then
found the dual allocation.
ccbase.c:110 allocates 7 bytes of memory
ccbase.c:127 allocates over the first allocation (in the case where my
prefix length is greater then 1).