diff options
Diffstat (limited to 'src/clients/klist/klist.c')
-rw-r--r-- | src/clients/klist/klist.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c index c3dac27..aae6262 100644 --- a/src/clients/klist/klist.c +++ b/src/clients/klist/klist.c @@ -614,6 +614,9 @@ show_credential(cred) if (show_etype) { retval = krb5_decode_ticket(&cred->ticket, &tkt); + if (retval) + goto err_tkt; + if (!extra_field) fputs("\t",stdout); else @@ -622,8 +625,11 @@ show_credential(cred) etype_string(cred->keyblock.enctype)); printf("%s ", etype_string(tkt->enc_part.enctype)); - krb5_free_ticket(kcontext, tkt); extra_field++; + + err_tkt: + if (tkt != NULL) + krb5_free_ticket(kcontext, tkt); } /* if any additional info was printed, extra_field is non-zero */ |