Use ALLOC to allocate memory, from harald barth.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23709 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1295,7 +1295,7 @@ build_server_referral(krb5_context context,
|
|||||||
memset(&ref, 0, sizeof(ref));
|
memset(&ref, 0, sizeof(ref));
|
||||||
|
|
||||||
if (referred_realm) {
|
if (referred_realm) {
|
||||||
ref.referred_realm = malloc(sizeof(ref.referred_realm));
|
ALLOC(ref.referred_realm);
|
||||||
if (ref.referred_realm == NULL)
|
if (ref.referred_realm == NULL)
|
||||||
goto eout;
|
goto eout;
|
||||||
*ref.referred_realm = strdup(referred_realm);
|
*ref.referred_realm = strdup(referred_realm);
|
||||||
@@ -1303,8 +1303,7 @@ build_server_referral(krb5_context context,
|
|||||||
goto eout;
|
goto eout;
|
||||||
}
|
}
|
||||||
if (true_principal_name) {
|
if (true_principal_name) {
|
||||||
ref.true_principal_name =
|
ALLOC(ref.true_principal_name);
|
||||||
malloc(sizeof(ref.true_principal_name));
|
|
||||||
if (ref.true_principal_name == NULL)
|
if (ref.true_principal_name == NULL)
|
||||||
goto eout;
|
goto eout;
|
||||||
ret = copy_PrincipalName(true_principal_name, ref.true_principal_name);
|
ret = copy_PrincipalName(true_principal_name, ref.true_principal_name);
|
||||||
@@ -1312,8 +1311,7 @@ build_server_referral(krb5_context context,
|
|||||||
goto eout;
|
goto eout;
|
||||||
}
|
}
|
||||||
if (requested_principal) {
|
if (requested_principal) {
|
||||||
ref.requested_principal_name =
|
ALLOC(ref.requested_principal_name);
|
||||||
malloc(sizeof(ref.requested_principal_name));
|
|
||||||
if (ref.requested_principal_name == NULL)
|
if (ref.requested_principal_name == NULL)
|
||||||
goto eout;
|
goto eout;
|
||||||
ret = copy_PrincipalName(requested_principal,
|
ret = copy_PrincipalName(requested_principal,
|
||||||
|
Reference in New Issue
Block a user