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
@@ -73,12 +73,11 @@ gss_inquire_cred(OM_uint32 *minor_status,
|
||||
*mechanisms = GSS_C_NO_OID_SET;
|
||||
|
||||
if (name_ret) {
|
||||
name = calloc(1, sizeof(*name));
|
||||
name = _gss_create_name(NULL, NULL);
|
||||
if (name == NULL) {
|
||||
*minor_status = ENOMEM;
|
||||
return (GSS_S_FAILURE);
|
||||
}
|
||||
HEIM_SLIST_INIT(&name->gn_mn);
|
||||
} else {
|
||||
name = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user