[krbdev.mit.edu #8706] Resource leak in get_best_princ_for_target()

Bean Zhang via RT rt-comment at KRBDEV-PROD-APP-1.mit.edu
Wed Jun 20 10:54:48 EDT 2018


Hi Team,

In get_best_princ_for_target() of krb5-1.16.1/srcclients/ksu/heuristic.c,
When calling krb5_sname_to_principal() succeeds, will store the allocated memory to end_server,
later when this function returns, it does not free the memory end_server points to.

The fix is to call krb5_free_principal() to free end_server when this function returns.

Could someone help to take a look?

Thanks,
Bean



More information about the krb5-bugs mailing list