From b6fd6f5f4bdfa6e68353e10060cbe5772dfddff6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 2 Sep 2008 09:20:56 +0000 Subject: [PATCH] 23709: Use ALLOC to allocate memory, from harald barth. git-svn-id: svn://svn.h5l.se/heimdal/branches/heimdal-release/heimdal-1-2-branch@23728 ec53bebd-3082-4978-b11e-865c3cabbd6b --- kdc/krb5tgs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kdc/krb5tgs.c b/kdc/krb5tgs.c index 4ac3b400c..362d7be29 100644 --- a/kdc/krb5tgs.c +++ b/kdc/krb5tgs.c @@ -1282,7 +1282,7 @@ build_server_referral(krb5_context context, memset(&ref, 0, sizeof(ref)); if (referred_realm) { - ref.referred_realm = malloc(sizeof(ref.referred_realm)); + ALLOC(ref.referred_realm); if (ref.referred_realm == NULL) goto eout; *ref.referred_realm = strdup(referred_realm); @@ -1290,8 +1290,7 @@ build_server_referral(krb5_context context, goto eout; } if (true_principal_name) { - ref.true_principal_name = - malloc(sizeof(ref.true_principal_name)); + ALLOC(ref.true_principal_name); if (ref.true_principal_name == NULL) goto eout; ret = copy_PrincipalName(true_principal_name, ref.true_principal_name); @@ -1299,8 +1298,7 @@ build_server_referral(krb5_context context, goto eout; } if (requested_principal) { - ref.requested_principal_name = - malloc(sizeof(ref.requested_principal_name)); + ALLOC(ref.requested_principal_name); if (ref.requested_principal_name == NULL) goto eout; ret = copy_PrincipalName(requested_principal, -- 2.11.4.GIT