diff options
Diffstat (limited to 'lib/krb5/rd_cred.c')
-rw-r--r-- | lib/krb5/rd_cred.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/krb5/rd_cred.c b/lib/krb5/rd_cred.c index b9b18ee99846..e38882525ab4 100644 --- a/lib/krb5/rd_cred.c +++ b/lib/krb5/rd_cred.c @@ -271,7 +271,11 @@ krb5_rd_cred(krb5_context context, } if(creds->ticket.length != len) krb5_abortx(context, "internal error in ASN.1 encoder"); - copy_EncryptionKey (&kci->key, &creds->session); + ret = copy_EncryptionKey (&kci->key, &creds->session); + if (ret) { + krb5_free_creds(context, creds); + goto out; + } if (kci->prealm && kci->pname) _krb5_principalname2krb5_principal (context, &creds->client, |