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

Bean Zhang via RT rt-comment at KRBDEV-PROD-APP-1.mit.edu
Thu Jun 14 10:37:54 EDT 2018


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?

Thanks,
Bean



More information about the krb5-bugs mailing list