gssapi: import mechglue allocation utility functions from Heimdal-520
Apple's Heimdal impelmentation uses a number of utility functions for allocating names and credentials, to avoid calling malloc or calloc directly. Import them.
This commit is contained in:

committed by
Nico Williams

parent
e0bb9c10ca
commit
83f15553e0
@@ -179,14 +179,12 @@ gss_acquire_cred_from(OM_uint32 *minor_status,
|
||||
} else
|
||||
mechs = _gss_mech_oids;
|
||||
|
||||
cred = calloc(1, sizeof(*cred));
|
||||
cred = _gss_mg_alloc_cred();
|
||||
if (cred == NULL) {
|
||||
*minor_status = ENOMEM;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
|
||||
HEIM_SLIST_INIT(&cred->gc_mc);
|
||||
|
||||
if (actual_mechs) {
|
||||
major_status = gss_create_empty_oid_set(minor_status, actual_mechs);
|
||||
if (GSS_ERROR(major_status))
|
||||
|
Reference in New Issue
Block a user