From: | Bean Zhang <bean.zhang@wesoft.com> |
To: | "krb5-bugs@mit.edu" <krb5-bugs@mit.edu> |
Subject: | Resource leak in domain_fallback_realm() |
Date: | Thu, 14 Jun 2018 09:10:29 +0000 |
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