[krbdev.mit.edu #8693] Resource leak in domain_fallback_realm()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[krbdev.mit.edu #8693] Resource leak in domain_fallback_realm()

Norm Green via RT
Hi Team,

In krb5-1.16.1/src/lib/krb5/os/hostrealm_domain.c,
domain_fallback_realm() assigns the storage returned from strdup() to uhost,
but later if calling profile_get_integer() fails, this function returns without freeing the storage uhost points to.

The fix is simple, just call "goto cleanup" instead of "return ret" if calling profile_get_integer() fails.

Could someone help to take a look?


krb5-bugs mailing list
[hidden email]