In release 1.13, commit
eba8c4909ec7ba0d7054d5d1b1061319e9970cc7
(ticket #7232) introduced a memory leak when skipping keytab entries
which do not match the application-provided server specification. Fix
it by freeing the keytab entry before continuing the loop on a failure
to match.
[ghudson@mit.edu: commit message]
ticket: 8239 (new)
target_version: 1.13.3
tags: pullup
if (!krb5_sname_match(context, server, ent.principal)) {
if (krb5_principal_compare(context, ent.principal, tkt_server))
tkt_server_mismatch = TRUE;
+ (void)krb5_free_keytab_entry_contents(context, &ent);
continue;
}
found_server_match = TRUE;