aboutsummaryrefslogtreecommitdiff
path: root/lib/krb5/get_for_creds.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/krb5/get_for_creds.c')
-rw-r--r--lib/krb5/get_for_creds.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/krb5/get_for_creds.c b/lib/krb5/get_for_creds.c
index 8a00ccec8133..43265d827fe5 100644
--- a/lib/krb5/get_for_creds.c
+++ b/lib/krb5/get_for_creds.c
@@ -355,11 +355,17 @@ krb5_get_forwarded_creds (krb5_context context,
krb_cred_info = enc_krb_cred_part.ticket_info.val;
- copy_EncryptionKey (&out_creds->session, &krb_cred_info->key);
+ ret = copy_EncryptionKey (&out_creds->session, &krb_cred_info->key);
+ if (ret)
+ goto out4;
ALLOC(krb_cred_info->prealm, 1);
- copy_Realm (&out_creds->client->realm, krb_cred_info->prealm);
+ ret = copy_Realm (&out_creds->client->realm, krb_cred_info->prealm);
+ if (ret)
+ goto out4;
ALLOC(krb_cred_info->pname, 1);
- copy_PrincipalName(&out_creds->client->name, krb_cred_info->pname);
+ ret = copy_PrincipalName(&out_creds->client->name, krb_cred_info->pname);
+ if (ret)
+ goto out4;
ALLOC(krb_cred_info->flags, 1);
*krb_cred_info->flags = out_creds->flags.b;
ALLOC(krb_cred_info->authtime, 1);
@@ -371,11 +377,17 @@ krb5_get_forwarded_creds (krb5_context context,
ALLOC(krb_cred_info->renew_till, 1);
*krb_cred_info->renew_till = out_creds->times.renew_till;
ALLOC(krb_cred_info->srealm, 1);
- copy_Realm (&out_creds->server->realm, krb_cred_info->srealm);
+ ret = copy_Realm (&out_creds->server->realm, krb_cred_info->srealm);
+ if (ret)
+ goto out4;
ALLOC(krb_cred_info->sname, 1);
- copy_PrincipalName (&out_creds->server->name, krb_cred_info->sname);
+ ret = copy_PrincipalName (&out_creds->server->name, krb_cred_info->sname);
+ if (ret)
+ goto out4;
ALLOC(krb_cred_info->caddr, 1);
- copy_HostAddresses (&out_creds->addresses, krb_cred_info->caddr);
+ ret = copy_HostAddresses (&out_creds->addresses, krb_cred_info->caddr);
+ if (ret)
+ goto out4;
krb5_free_creds (context, out_creds);