Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions src/gp_creds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,21 +1105,20 @@ uint32_t gp_count_tickets(uint32_t *min, gss_cred_id_t cred, uint32_t *ccsum)
goto done;
}

do {
err = krb5_cc_next_cred(context, ccache, &cursor, &creds);
if (err != 0 && err != KRB5_CC_END) {
ret_min = err;
ret_maj = GSS_S_FAILURE;
goto done;
}

while ((err = krb5_cc_next_cred(context, ccache, &cursor, &creds)) == 0) {
krb5_free_cred_contents(context, &creds);

/* TODO: Should we do a real checksum over all creds->ticket data and
* flags in future ? */
(*ccsum)++;

} while (err == 0);
}
if (err != KRB5_CC_END) {
ret_min = err;
ret_maj = GSS_S_FAILURE;
/* do not leak the cursor when an iteration error occurs */
krb5_cc_end_seq_get(context, ccache, &cursor);
goto done;
}

err = krb5_cc_end_seq_get(context, ccache, &cursor);
if (err != 0) {
Expand Down
Loading