krb5_dbe_lookup_last_pwd_change(arg->kcontext, entry,
&last_pwd_change))) {
fprintf(stderr, nokeys_err, arg->programname, name);
- krb5_xfree(mod_name);
- krb5_xfree(name);
+ free(mod_name);
+ free(name);
return(retval);
}
KRB5_KDB_SALTTYPE_V4,
&akey))) {
fprintf(stderr, nokeys_err, arg->programname, name);
- krb5_xfree(mod_name);
- krb5_xfree(name);
+ free(mod_name);
+ free(name);
return(retval);
}
/* If we're blabbing, do it */
if (arg->verbose)
fprintf(stderr, "%s\n", name);
- krb5_xfree(mod_name);
+ free(mod_name);
}
- krb5_xfree(name);
+ free(name);
return(0);
}
retval = EINVAL;
}
}
- krb5_xfree(name);
+ free(name);
return(retval);
}
printf(")");
}
printf("\n");
- krb5_xfree(pname);
+ free(pname);
}
}
/* zap the password */
memset(clear.data, 0, clear.length);
memset(ptr, 0, clear.length);
- krb5_xfree(clear.data);
+ free(clear.data);
free(ptr);
clear.length = 0;
reply */
if (ap_rep.length) {
- krb5_xfree(ap_rep.data);
+ free(ap_rep.data);
ap_rep.length = 0;
}
if (changepw)
krb5_free_principal(context, changepw);
if (ap_rep.length)
- krb5_xfree(ap_rep.data);
+ free(ap_rep.data);
if (ticket)
krb5_free_ticket(context, ticket);
if (clear.length)
- krb5_xfree(clear.data);
+ free(clear.data);
if (cipher.length)
- krb5_xfree(cipher.data);
+ free(cipher.data);
if (target)
krb5_free_principal(context, target);
if (targetstr)
/* clean & free the input string */
memset(password, 0, (size_t) pw_len);
- krb5_xfree(password);
+ free(password);
}
#if 0
/* must free here because it was copied for this special case */
- krb5_xfree(salt->data);
+ free(salt->data);
#endif
return 0;
}
krb5int_c_free_keyblock(krb5_context context, register krb5_keyblock *val)
{
krb5int_c_free_keyblock_contents(context, val);
- krb5_xfree(val);
+ free(val);
}
void
{
if (key->contents) {
krb5int_zap_data (key->contents, key->length);
- krb5_xfree(key->contents);
+ free(key->contents);
key->contents = 0;
}
}
krb5_free_cksumtypes(krb5_context context, krb5_cksumtype *val)
{
if (val)
- krb5_xfree(val);
+ free(val);
return;
}
!krb5_aprof_get_string(aprofile, hierarchy, TRUE, &svalue)) {
if (!krb5_string_to_enctype(svalue, ¶ms.enctype)) {
params.mask |= KADM5_CONFIG_ENCTYPE;
- krb5_xfree(svalue);
+ free(svalue);
}
} else {
params.mask |= KADM5_CONFIG_ENCTYPE;
!krb5_aprof_get_string(aprofile, hierarchy, TRUE, &svalue)) {
if (!krb5_string_to_timestamp(svalue, ¶ms.expiration)) {
params.mask |= KADM5_CONFIG_EXPIRATION;
- krb5_xfree(svalue);
+ free(svalue);
}
} else {
params.mask |= KADM5_CONFIG_EXPIRATION;
}
if (!sp)
params.mask |= KADM5_CONFIG_FLAGS;
- krb5_xfree(svalue);
+ free(svalue);
} else {
params.mask |= KADM5_CONFIG_FLAGS;
params.flags = KRB5_KDB_DEF_FLAGS;
if (params.num_keysalts)
params.mask |= KADM5_CONFIG_ENCTYPES;
- krb5_xfree(svalue);
+ free(svalue);
}
hierarchy[2] = "iprop_enable";
if (!krb5_aprof_get_string(aprofile, hierarchy, TRUE, &svalue)) {
if (!krb5_string_to_enctype(svalue, &rparams->realm_enctype))
rparams->realm_enctype_valid = 1;
- krb5_xfree(svalue);
+ free(svalue);
}
/* Get the value for the stashfile */
if (!krb5_string_to_timestamp(svalue,
&rparams->realm_expiration))
rparams->realm_expiration_valid = 1;
- krb5_xfree(svalue);
+ free(svalue);
}
hierarchy[2] = "reject_bad_transit";
}
if (!sp)
rparams->realm_flags_valid = 1;
- krb5_xfree(svalue);
+ free(svalue);
}
rparams->realm_keysalts = NULL;
krb5_realm_params *rparams;
{
if (rparams) {
- krb5_xfree(rparams->realm_profile);
- krb5_xfree(rparams->realm_dbname);
- krb5_xfree(rparams->realm_mkey_name);
- krb5_xfree(rparams->realm_stash_file);
- krb5_xfree(rparams->realm_keysalts);
- krb5_xfree(rparams->realm_kdc_ports);
- krb5_xfree(rparams->realm_kdc_tcp_ports);
- krb5_xfree(rparams->realm_acl_file);
- krb5_xfree(rparams->realm_no_host_referral);
- krb5_xfree(rparams->realm_host_based_services);
- krb5_xfree(rparams);
+ free(rparams->realm_profile);
+ free(rparams->realm_dbname);
+ free(rparams->realm_mkey_name);
+ free(rparams->realm_stash_file);
+ free(rparams->realm_keysalts);
+ free(rparams->realm_kdc_ports);
+ free(rparams->realm_kdc_tcp_ports);
+ free(rparams->realm_acl_file);
+ free(rparams->realm_no_host_referral);
+ free(rparams->realm_host_based_services);
+ free(rparams);
}
return(0);
}
if (savep) {
memcpy(*ksaltp, savep,
len * sizeof(krb5_key_salt_tuple));
- krb5_xfree(savep);
+ free(savep);
}
/* Save our values */
if ((retval = krb5_c_decrypt(context, mkey, 0 /* XXX */, 0,
&cipher, &plain))) {
- krb5_xfree(plain.data);
+ free(plain.data);
return retval;
}
any better than that. */
if (tmplen > plain.length) {
- krb5_xfree(plain.data);
+ free(plain.data);
return(KRB5_CRYPTO_INTERNAL);
}
if ((keysalt->data.length = key_data->key_data_length[1])) {
if (!(keysalt->data.data=(char *)malloc(keysalt->data.length))){
if (key_data->key_data_contents[0]) {
- krb5_xfree(dbkey->contents);
+ free(dbkey->contents);
dbkey->contents = 0;
dbkey->length = 0;
}
for (i = 0; i < key_data->key_data_ver; i++)
if (key_data->key_data_contents[i])
- krb5_xfree(key_data->key_data_contents[i]);
+ free(key_data->key_data_contents[i]);
key_data->key_data_ver = 1;
key_data->key_data_kvno = keyver;
if ((retval = krb5_c_encrypt(context, mkey, /* XXX */ 0, 0,
&plain, &cipher))) {
- krb5_xfree(key_data->key_data_contents[0]);
+ free(key_data->key_data_contents[0]);
return retval;
}
key_data->key_data_contents[1] =
(krb5_octet *)malloc(keysalt->data.length);
if (key_data->key_data_contents[1] == NULL) {
- krb5_xfree(key_data->key_data_contents[0]);
+ free(key_data->key_data_contents[0]);
return ENOMEM;
}
memcpy(key_data->key_data_contents[1], keysalt->data.data,
}
if (!salt)
- krb5_xfree(scratch.data);
+ free(scratch.data);
memset(password, 0, sizeof(password)); /* erase it */
} else {
return(retval);
key_salt.data = *saltdata;
- krb5_xfree(saltdata);
+ free(saltdata);
}
break;
case KRB5_KDB_SALTTYPE_NOREALM:
key_salt.data = *saltdata;
key_salt.data.length = SALT_TYPE_AFS_LENGTH; /*length actually used below...*/
- krb5_xfree(saltdata);
+ free(saltdata);
#else
/* Why do we do this? Well, the afs_mit_string_to_key needs to
use strlen, and the realm is not NULL terminated.... */
kvno, &tmp_key_data);
if (key_salt.data.data)
free(key_salt.data.data);
- krb5_xfree(key.contents);
+ free(key.contents);
if( retval )
return retval;
}
memset((char *)tempkey.contents, 0, tempkey.length);
- krb5_xfree(tempkey.contents);
+ free(tempkey.contents);
krb5_db_free_principal(context, &master_entry, nprinc);
return retval;
*/
kt->ops = NULL;
- krb5_xfree(kt);
+ free(kt);
return 0;
}
errout:
while(--i >= 0)
free(krb5_princ_component(context, tmpprinc, i)->data);
- krb5_xfree(krb5_princ_realm(context, tmpprinc)->data);
+ free(krb5_princ_realm(context, tmpprinc)->data);
free((char *)tmpprinc->data);
free((char *)tmpprinc);
return kret;
return KRB5_OK;
errout:
if (keyblock->contents) {
- krb5_xfree(keyblock->contents);
+ free(keyblock->contents);
keyblock->contents = NULL;
}
return kret;
return KRB5_OK;
errout:
if (data->data) {
- krb5_xfree(data->data);
+ free(data->data);
data->data = NULL;
}
return kret;
return KRB5_OK;
errout:
if (addr->contents) {
- krb5_xfree(addr->contents);
+ free(addr->contents);
addr->contents = NULL;
}
return kret;
return KRB5_OK;
errout:
if (a->contents) {
- krb5_xfree(a->contents);
+ free(a->contents);
a->contents = NULL;
}
return kret;
krb5_fcc_close(krb5_context context, krb5_ccache id)
{
dereference(context, (krb5_fcc_data *) id->data);
- krb5_xfree(id);
+ free(id);
return KRB5_OK;
}
cleanup:
k5_cc_mutex_unlock(context, &data->lock);
dereference(context, data);
- krb5_xfree(id);
+ free(id);
krb5_change_cache ();
return kret;
if (OPENCLOSE(id)) {
kret = krb5_fcc_open_file(context, id, FCC_OPEN_RDONLY);
if (kret) {
- krb5_xfree(fcursor);
+ free(fcursor);
k5_cc_mutex_unlock(context, &data->lock);
return kret;
}
/* Make sure we start reading right after the primary principal */
kret = krb5_fcc_skip_header(context, id);
if (kret) {
- krb5_xfree(fcursor);
+ free(fcursor);
goto done;
}
kret = krb5_fcc_skip_principal(context, id);
if (kret) {
- krb5_xfree(fcursor);
+ free(fcursor);
goto done;
}
and if not, fcc_start_seq_get and/or fcc_next_cred will do the
MAYBE_CLOSE.
MAYBE_CLOSE(context, id, kret); */
- krb5_xfree((krb5_fcc_cursor *) *cursor);
+ free((krb5_fcc_cursor *) *cursor);
return 0;
}
d = (krb5_krcc_data *) id->data;
- krb5_xfree(d->name);
+ free(d->name);
k5_cc_mutex_destroy(&d->lock);
- krb5_xfree(d);
+ free(d);
- krb5_xfree(id);
+ free(id);
return KRB5_OK;
}
return kret;
krb5_krcc_clearcache(context, id);
- krb5_xfree(d->name);
+ free(d->name);
res = keyctl_unlink(d->ring_id, d->parent_id);
if (res < 0) {
kret = errno;
cleanup:
k5_cc_mutex_unlock(context, &d->lock);
k5_cc_mutex_destroy(&d->lock);
- krb5_xfree(d);
- krb5_xfree(id);
+ free(d);
+ free(id);
krb5_change_cache();
kret = k5_cc_mutex_init(&d->lock);
if (kret) {
- krb5_xfree(d);
+ free(d);
return kret;
}
d->name = strdup(name);
if (d->name == NULL) {
k5_cc_mutex_destroy(&d->lock);
- krb5_xfree(d);
+ free(d);
return KRB5_CC_NOMEM;
}
d->princ_id = 0;
kret = krb5_krcc_new_data(uniquename, key, ring_id, &d);
k5_cc_mutex_unlock(context, &krb5int_krcc_mutex);
if (kret) {
- krb5_xfree(lid);
+ free(lid);
return kret;
}
lid->data = d;
cleanticket:
memset(creds->ticket.data, 0, (unsigned) creds->ticket.length);
- krb5_xfree(creds->ticket.data);
+ free(creds->ticket.data);
cleanauthdata:
krb5_free_authdata(context, creds->authdata);
cleanaddrs:
krb5_free_addresses(context, creds->addresses);
cleanblock:
- krb5_xfree(creds->keyblock.contents);
+ free(creds->keyblock.contents);
cleanserver:
krb5_free_principal(context, creds->server);
cleanclient:
errout:
while (--i >= 0)
free(krb5_princ_component(context, tmpprinc, i)->data);
- krb5_xfree(krb5_princ_realm(context, tmpprinc)->data);
+ free(krb5_princ_realm(context, tmpprinc)->data);
free((char *) tmpprinc->data);
free((char *) tmpprinc);
return kret;
return KRB5_OK;
errout:
if (keyblock->contents)
- krb5_xfree(keyblock->contents);
+ free(keyblock->contents);
return kret;
}
return KRB5_OK;
errout:
if (data->data)
- krb5_xfree(data->data);
+ free(data->data);
return kret;
}
return KRB5_OK;
errout:
if (addr->contents)
- krb5_xfree(addr->contents);
+ free(addr->contents);
return kret;
}
return KRB5_OK;
errout:
if (a->contents)
- krb5_xfree(a->contents);
+ free(a->contents);
return kret;
}
krb5_error_code KRB5_CALLCONV
krb5_mcc_close(krb5_context context, krb5_ccache id)
{
- krb5_xfree(id);
+ free(id);
return KRB5_OK;
}
for (curr = d->link; curr;) {
krb5_free_creds(context, curr->creds);
next = curr->next;
- krb5_xfree(curr);
+ free(curr);
curr = next;
}
d->link = NULL;
return err;
krb5_mcc_free(context, id);
- krb5_xfree(d->name);
+ free(d->name);
k5_cc_mutex_unlock(context, &d->lock);
k5_cc_mutex_destroy(&d->lock);
- krb5_xfree(d);
- krb5_xfree(id);
+ free(d);
+ free(id);
krb5_change_cache ();
return KRB5_OK;
err = k5_cc_mutex_init(&d->lock);
if (err) {
- krb5_xfree(d);
+ free(d);
return err;
}
d->name = strdup(name);
if (d->name == NULL) {
k5_cc_mutex_destroy(&d->lock);
- krb5_xfree(d);
+ free(d);
return KRB5_CC_NOMEM;
}
d->link = NULL;
k5_cc_mutex_unlock(context, &krb5int_mcc_mutex);
if (err) {
- krb5_xfree(lid);
+ free(lid);
return err;
}
lid->data = d;
return FALSE;
memcpy(ticket, newdata, sizeof(krb5_data));
- krb5_xfree(newdata);
+ free(newdata);
return TRUE;
}
lid->data = (krb5_pointer) malloc(sizeof(krb5_lcc_data));
if (lid->data == NULL) {
- krb5_xfree(lid);
+ free(lid);
CloseHandle(LogonHandle);
return KRB5_CC_NOMEM;
}
data->cc_name = (char *)malloc(strlen(residual)+1);
if (data->cc_name == NULL) {
- krb5_xfree(lid->data);
- krb5_xfree(lid);
+ free(lid->data);
+ free(lid);
CloseHandle(LogonHandle);
return KRB5_CC_NOMEM;
}
krb5_copy_principal(context, creds.client, &data->princ);
krb5_free_cred_contents(context,&creds);
} else if (!does_retrieve_ticket_cache_ticket()) {
- krb5_xfree(data->cc_name);
- krb5_xfree(lid->data);
- krb5_xfree(lid);
+ free(data->cc_name);
+ free(lid->data);
+ free(lid);
CloseHandle(LogonHandle);
return KRB5_FCC_NOFILE;
}
if (data) {
CloseHandle(data->LogonHandle);
- krb5_xfree(data);
+ free(data);
}
- krb5_xfree(id);
+ free(id);
}
return closeval;
}
(*id)->ops = ops;
if ((data = (krb5_ktfile_data *)malloc(sizeof(krb5_ktfile_data))) == NULL) {
- krb5_xfree(*id);
+ free(*id);
return(ENOMEM);
}
err = k5_mutex_init(&data->lock);
if (err) {
- krb5_xfree(data);
- krb5_xfree(*id);
+ free(data);
+ free(*id);
return err;
}
if ((data->name = strdup(name)) == NULL) {
k5_mutex_destroy(&data->lock);
- krb5_xfree(data);
- krb5_xfree(*id);
+ free(data);
+ free(*id);
return(ENOMEM);
}
* This routine should undo anything done by krb5_ktfile_resolve().
*/
{
- krb5_xfree(KTFILENAME(id));
+ free(KTFILENAME(id));
zap(KTFILEBUFP(id), BUFSIZ);
k5_mutex_destroy(&((krb5_ktfile_data *)id->data)->lock);
- krb5_xfree(id->data);
+ free(id->data);
id->ops = 0;
- krb5_xfree(id);
+ free(id);
return (0);
}
{
krb5_error_code kerror;
- krb5_xfree(*cursor);
+ free(*cursor);
kerror = KTLOCK(id);
if (kerror)
return kerror;
if (kret) {
if (keytab->data) {
if (KTFILENAME(keytab))
- krb5_xfree(KTFILENAME(keytab));
- krb5_xfree(keytab->data);
+ free(KTFILENAME(keytab));
+ free(keytab->data);
}
- krb5_xfree(keytab);
+ free(keytab);
}
else {
*buffer = bp;
next_node = node->next;
/* destroy the contents of node->keytab */
- krb5_xfree(KTNAME(node->keytab));
+ free(KTNAME(node->keytab));
/* free the keytab entries */
for (cursor = KTLINK(node->keytab); cursor; cursor = next_cursor) {
* krb5_context since we know that the context isn't used by
* krb5_kt_free_entry or krb5_free_principal. */
krb5_kt_free_entry(NULL, cursor->entry);
- krb5_xfree(cursor->entry);
- krb5_xfree(cursor);
+ free(cursor->entry);
+ free(cursor);
}
/* destroy the lock */
k5_mutex_destroy(&(((krb5_mkt_data *)node->keytab->data)->lock));
/* free the private data */
- krb5_xfree(node->keytab->data);
+ free(node->keytab->data);
/* and the keytab */
- krb5_xfree(node->keytab);
+ free(node->keytab);
/* and finally the node */
- krb5_xfree(node);
+ free(node);
}
}
/*
}
if ((list->keytab = (krb5_keytab)malloc(sizeof(struct _krb5_kt))) == NULL) {
- krb5_xfree(list);
+ free(list);
err = ENOMEM;
goto done;
}
list->keytab->ops = &krb5_mkt_ops;
if ((data = (krb5_mkt_data *)malloc(sizeof(krb5_mkt_data))) == NULL) {
- krb5_xfree(list->keytab);
- krb5_xfree(list);
+ free(list->keytab);
+ free(list);
err = ENOMEM;
goto done;
}
err = k5_mutex_init(&data->lock);
if (err) {
- krb5_xfree(data);
- krb5_xfree(list->keytab);
- krb5_xfree(list);
+ free(data);
+ free(list->keytab);
+ free(list);
goto done;
}
if ((data->name = strdup(name)) == NULL) {
k5_mutex_destroy(&data->lock);
- krb5_xfree(data);
- krb5_xfree(list->keytab);
- krb5_xfree(list);
+ free(data);
+ free(list->keytab);
+ free(list);
err = ENOMEM;
goto done;
}
if (err) {
k5_mutex_destroy(&data->lock);
if (data && data->name)
- krb5_xfree(data->name);
- krb5_xfree(data);
+ free(data->name);
+ free(data);
if (list && list->keytab)
- krb5_xfree(list->keytab);
- krb5_xfree(list);
+ free(list->keytab);
+ free(list);
} else {
KTREFCNT(*id)++;
KTUNLOCK(*id);
*listp = node->next;
/* destroy the contents of node->keytab (aka id) */
- krb5_xfree(data->name);
+ free(data->name);
/* free the keytab entries */
for (cursor = KTLINK(node->keytab); cursor; cursor = next_cursor) {
next_cursor = cursor->next;
krb5_kt_free_entry(context, cursor->entry);
- krb5_xfree(cursor->entry);
- krb5_xfree(cursor);
+ free(cursor->entry);
+ free(cursor);
}
/* destroy the lock */
k5_mutex_destroy(&(data->lock));
/* free the private data */
- krb5_xfree(data);
+ free(data);
/* and the keytab */
- krb5_xfree(node->keytab);
+ free(node->keytab);
/* and finally the node */
- krb5_xfree(node);
+ free(node);
}
#endif /* HEIMDAL_COMPATIBLE */
}
cursor->entry = (krb5_keytab_entry *)malloc(sizeof(krb5_keytab_entry));
if (cursor->entry == NULL) {
- krb5_xfree(cursor);
+ free(cursor);
err = ENOMEM;
goto done;
}
err = krb5_copy_keyblock_contents(context, &(entry->key),
&(cursor->entry->key));
if (err) {
- krb5_xfree(cursor->entry);
- krb5_xfree(cursor);
+ free(cursor->entry);
+ free(cursor);
goto done;
}
err = krb5_copy_principal(context, entry->principal, &(cursor->entry->principal));
if (err) {
krb5_free_keyblock_contents(context, &(cursor->entry->key));
- krb5_xfree(cursor->entry);
- krb5_xfree(cursor);
+ free(cursor->entry);
+ free(cursor);
goto done;
}
}
krb5_kt_free_entry(context, (*pcursor)->entry);
- krb5_xfree((*pcursor)->entry);
+ free((*pcursor)->entry);
next = (*pcursor)->next;
- krb5_xfree(*pcursor);
+ free(*pcursor);
(*pcursor) = next;
done:
(*id)->ops = &krb5_kts_ops;
data = (krb5_ktsrvtab_data *)malloc(sizeof(krb5_ktsrvtab_data));
if (data == NULL) {
- krb5_xfree(*id);
+ free(*id);
return(ENOMEM);
}
data->name = strdup(name);
if (data->name == NULL) {
- krb5_xfree(data);
- krb5_xfree(*id);
+ free(data);
+ free(*id);
return(ENOMEM);
}
* This routine should undo anything done by krb5_ktsrvtab_resolve().
*/
{
- krb5_xfree(KTFILENAME(id));
- krb5_xfree(id->data);
+ free(KTFILENAME(id));
+ free(id->data);
id->ops = 0;
- krb5_xfree(id);
+ free(id);
return (0);
}
krb5_error_code KRB5_CALLCONV
krb5_ktsrvtab_end_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor)
{
- krb5_xfree(*cursor);
+ free(*cursor);
return krb5_ktsrvint_close(context, id);
}
krb5_free_principal(context, entry->principal);
if (entry->key.contents) {
zap((char *)entry->key.contents, entry->key.length);
- krb5_xfree(entry->key.contents);
+ free(entry->key.contents);
}
return 0;
}
return ENOMEM;
*tmpad = *inad;
if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
- krb5_xfree(tmpad);
+ free(tmpad);
return ENOMEM;
}
memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
if (auth_context->rcache)
krb5_rc_close(context, auth_context->rcache);
if (auth_context->permitted_etypes)
- krb5_xfree(auth_context->permitted_etypes);
+ free(auth_context->permitted_etypes);
free(auth_context);
return 0;
}
return(ENOMEM);
if (auth_context->permitted_etypes)
- krb5_xfree(auth_context->permitted_etypes);
+ free(auth_context->permitted_etypes);
auth_context->permitted_etypes = newpe;
return ENOMEM;
princ_ret = (krb5_principal) malloc(sizeof(krb5_principal_data));
if (!princ_ret) {
- krb5_xfree(princ_data);
+ free(princ_data);
return ENOMEM;
}
princ_ret->data = princ_data;
princ_ret->length = count;
tmpdata = malloc(rlen+1);
if (!tmpdata) {
- krb5_xfree(princ_data);
- krb5_xfree(princ_ret);
+ free(princ_data);
+ free(princ_ret);
return ENOMEM;
}
krb5_princ_set_realm_length(context, princ_ret, rlen);
free_out:
while (--i >= 0)
- krb5_xfree(princ_data[i].data);
- krb5_xfree(princ_data);
- krb5_xfree(princ_ret);
- krb5_xfree(tmpdata);
+ free(princ_data[i].data);
+ free(princ_data);
+ free(princ_ret);
+ free(tmpdata);
va_end(ap);
return ENOMEM;
}
if (data) {
while (--count >= 0) {
- krb5_xfree(data[count].data);
+ free(data[count].data);
}
- krb5_xfree(data);
+ free(data);
}
- krb5_xfree(r);
+ free(r);
return retval;
}
if (!retval) {
*princ = p;
} else {
- krb5_xfree(p);
+ free(p);
}
return retval;
if (!retval) {
*princ = p;
} else {
- krb5_xfree(p);
+ free(p);
}
return retval;
cleanup:
if (ap_rep.length) {
- krb5_xfree(clearresult.data);
+ free(clearresult.data);
} else {
krb5_free_error(context, krberror);
}
*cp = tolower((unsigned char) *cp);
strncat(buf, ".", sizeof(buf) - 1 - strlen(buf));
strncat(buf, domain, sizeof(buf) - 1 - strlen(buf));
- krb5_xfree(domain);
+ free(domain);
}
instance = buf;
}
return ENOMEM;
*tmpad = *inad;
if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
- krb5_xfree(tmpad);
+ free(tmpad);
return ENOMEM;
}
memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
retval = krb5_copy_principal(context, authfrom->client, &tempto->client);
if (retval) {
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
if (authfrom->checksum &&
(retval = krb5_copy_checksum(context, authfrom->checksum, &tempto->checksum))) {
krb5_free_principal(context, tempto->client);
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
if (authfrom->subkey) {
retval = krb5_copy_keyblock(context, authfrom->subkey, &tempto->subkey);
if (retval) {
- krb5_xfree(tempto->subkey);
+ free(tempto->subkey);
krb5_free_checksum(context, tempto->checksum);
krb5_free_principal(context, tempto->client);
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
}
retval = krb5_copy_authdata(context, authfrom->authorization_data,
&tempto->authorization_data);
if (retval) {
- krb5_xfree(tempto->subkey);
+ free(tempto->subkey);
krb5_free_checksum(context, tempto->checksum);
krb5_free_principal(context, tempto->client);
krb5_free_authdata(context, tempto->authorization_data);
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
}
return ENOMEM;
*tmpad = *inad;
if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
- krb5_xfree(tmpad);
+ free(tmpad);
return ENOMEM;
}
memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
if (!(tempto->contents =
(krb5_octet *)malloc(tempto->length))) {
- krb5_xfree(tempto);
+ free(tempto);
return ENOMEM;
}
memcpy((char *) tempto->contents, (char *) ckfrom->contents,
if (retval)
goto cleanaddrs;
tempcred->ticket = *scratch;
- krb5_xfree(scratch);
+ free(scratch);
retval = krb5_copy_data(context, &incred->second_ticket, &scratch);
if (retval)
goto clearticket;
tempcred->second_ticket = *scratch;
- krb5_xfree(scratch);
+ free(scratch);
retval = krb5_copy_authdata(context, incred->authdata,&tempcred->authdata);
if (retval)
cleanaddrs:
krb5_free_addresses(context, tempcred->addresses);
cleanblock:
- krb5_xfree(tempcred->keyblock.contents);
+ free(tempcred->keyblock.contents);
cleanserver:
krb5_free_principal(context, tempcred->server);
cleanclient:
retval = krb5int_copy_data_contents(context, indata, tempdata);
if (retval) {
- krb5_xfree(tempdata);
+ free(tempdata);
return retval;
}
return ENOMEM;
*new_key = *from;
if (!(new_key->contents = (krb5_octet *)malloc(new_key->length))) {
- krb5_xfree(new_key);
+ free(new_key);
return(ENOMEM);
}
memcpy((char *)new_key->contents, (char *)from->contents,
retval = krb5_copy_keyblock(context, partfrom->session,
&tempto->session);
if (retval) {
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
retval = krb5_copy_principal(context, partfrom->client, &tempto->client);
if (retval) {
krb5_free_keyblock(context, tempto->session);
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
tempto->transited = partfrom->transited;
if (!tempto->transited.tr_contents.data) {
krb5_free_principal(context, tempto->client);
krb5_free_keyblock(context, tempto->session);
- krb5_xfree(tempto);
+ free(tempto);
return ENOMEM;
}
memcpy((char *)tempto->transited.tr_contents.data,
retval = krb5_copy_addresses(context, partfrom->caddrs, &tempto->caddrs);
if (retval) {
- krb5_xfree(tempto->transited.tr_contents.data);
+ free(tempto->transited.tr_contents.data);
krb5_free_principal(context, tempto->client);
krb5_free_keyblock(context, tempto->session);
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
if (partfrom->authorization_data) {
&tempto->authorization_data);
if (retval) {
krb5_free_addresses(context, tempto->caddrs);
- krb5_xfree(tempto->transited.tr_contents.data);
+ free(tempto->transited.tr_contents.data);
krb5_free_principal(context, tempto->client);
krb5_free_keyblock(context, tempto->session);
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
}
*tempto = *from;
retval = krb5_copy_principal(context, from->server, &tempto->server);
if (retval) {
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
retval = krb5_copy_data(context, &from->enc_part.ciphertext, &scratch);
if (retval) {
krb5_free_principal(context, tempto->server);
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
tempto->enc_part.ciphertext = *scratch;
- krb5_xfree(scratch);
+ free(scratch);
retval = krb5_copy_enc_tkt_part(context, from->enc_part2, &tempto->enc_part2);
if (retval) {
- krb5_xfree(tempto->enc_part.ciphertext.data);
+ free(tempto->enc_part.ciphertext.data);
krb5_free_principal(context, tempto->server);
- krb5_xfree(tempto);
+ free(tempto);
return retval;
}
*pto = tempto;
krb5_free_principal(context, *nrealms);
nrealms++;
}
- krb5_xfree(realms);
+ free(realms);
}
krb5_free_data(context, scratch);
} else {
*outbuf = *scratch;
- krb5_xfree(scratch);
+ free(scratch);
}
errout:
if ((retval = krb5_copy_data(context, psectkt, &pdata)))
goto cleanup;
(*ppcreds)->second_ticket = *pdata;
- krb5_xfree(pdata);
+ free(pdata);
(*ppcreds)->ticket_flags = pkdcrep->enc_part2->flags;
(*ppcreds)->times = pkdcrep->enc_part2->times;
return(ENOMEM);
if ((retval = krb5_c_make_random_key(context, enctype, *subkey))) {
- krb5_xfree(*subkey);
+ free(*subkey);
return(retval);
}
/* The caller is now responsible for cleaning up in_creds */
if ((retval = krb5_cc_retrieve_cred(context, ccache, fields, &mcreds,
ncreds))) {
- krb5_xfree(ncreds);
+ free(ncreds);
ncreds = in_creds;
} else {
*out_creds = ncreds;
/* ick. copy the struct contents, free the container */
if (out_creds) {
*creds = *out_creds;
- krb5_xfree(out_creds);
+ free(out_creds);
}
cleanup:
retval = (*key_proc)(context, as_reply->enc_part.enctype,
&salt, keyseed, &decrypt_key);
- krb5_xfree(salt.data);
+ free(salt.data);
if (retval)
goto cleanup;
}
goto cleanup;
creds->ticket = *packet;
- krb5_xfree(packet);
+ free(packet);
/* store it in the ccache! */
if (ccache)
if (creds->keyblock.contents) {
memset((char *)creds->keyblock.contents, 0,
creds->keyblock.length);
- krb5_xfree(creds->keyblock.contents);
+ free(creds->keyblock.contents);
creds->keyblock.contents = 0;
creds->keyblock.length = 0;
}
if (creds->ticket.data) {
- krb5_xfree(creds->ticket.data);
+ free(creds->ticket.data);
creds->ticket.data = 0;
}
if (creds->addresses) {
krb5_free_keyblock_contents(context, &as_key);
if (salt.data &&
(!(options && (options->flags & KRB5_GET_INIT_CREDS_OPT_SALT))))
- krb5_xfree(salt.data);
+ free(salt.data);
krb5_free_data_contents(context, &s2kparams);
if (as_reply)
*as_reply = local_as_reply;
/* again, krb5's memory management is lame... */
*as_key = *kt_key;
- krb5_xfree(kt_key);
+ free(kt_key);
(void) krb5_kt_free_entry(context, &kt_ent);
params->data?params:NULL, as_key);
if (defsalt.length)
- krb5_xfree(defsalt.data);
+ free(defsalt.data);
return(ret);
}
/* the change succeeded. go on */
if (result_code == 0) {
- krb5_xfree(result_string.data);
+ free(result_string.data);
break;
}
ret = KRB5_CHPW_FAIL;
if (result_code != KRB5_KPASSWD_SOFTERROR) {
- krb5_xfree(result_string.data);
+ free(result_string.data);
goto cleanup;
}
(int) result_string.length,
result_string.data ? result_string.data : "");
- krb5_xfree(code_string.data);
- krb5_xfree(result_string.data);
+ free(code_string.data);
+ free(result_string.data);
}
}
krb5_free_address(krb5_context context, krb5_address *val)
{
if (val->contents)
- krb5_xfree(val->contents);
- krb5_xfree(val);
+ free(val->contents);
+ free(val);
}
void KRB5_CALLCONV
for (temp = val; *temp; temp++) {
if ((*temp)->contents)
- krb5_xfree((*temp)->contents);
- krb5_xfree(*temp);
+ free((*temp)->contents);
+ free(*temp);
}
- krb5_xfree(val);
+ free(val);
}
krb5_free_ap_rep(krb5_context context, register krb5_ap_rep *val)
{
if (val->enc_part.ciphertext.data)
- krb5_xfree(val->enc_part.ciphertext.data);
- krb5_xfree(val);
+ free(val->enc_part.ciphertext.data);
+ free(val);
}
void KRB5_CALLCONV
if (val->ticket)
krb5_free_ticket(context, val->ticket);
if (val->authenticator.ciphertext.data)
- krb5_xfree(val->authenticator.ciphertext.data);
- krb5_xfree(val);
+ free(val->authenticator.ciphertext.data);
+ free(val);
}
void KRB5_CALLCONV
{
if (val->subkey)
krb5_free_keyblock(context, val->subkey);
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
for (temp = val; *temp; temp++) {
if ((*temp)->contents)
- krb5_xfree((*temp)->contents);
- krb5_xfree(*temp);
+ free((*temp)->contents);
+ free(*temp);
}
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
krb5_free_authenticator(krb5_context context, krb5_authenticator *val)
{
krb5_free_authenticator_contents(context, val);
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
krb5_free_checksum(krb5_context context, register krb5_checksum *val)
{
krb5_free_checksum_contents(context, val);
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
krb5_free_checksum_contents(krb5_context context, register krb5_checksum *val)
{
if (val->contents) {
- krb5_xfree(val->contents);
+ free(val->contents);
val->contents = 0;
}
}
if (val->tickets)
krb5_free_tickets(context, val->tickets);
if (val->enc_part.ciphertext.data)
- krb5_xfree(val->enc_part.ciphertext.data);
- krb5_xfree(val);
+ free(val->enc_part.ciphertext.data);
+ free(val);
}
/*
}
if (val->keyblock.contents) {
memset((char *)val->keyblock.contents, 0, val->keyblock.length);
- krb5_xfree(val->keyblock.contents);
+ free(val->keyblock.contents);
val->keyblock.contents = 0;
}
if (val->ticket.data) {
- krb5_xfree(val->ticket.data);
+ free(val->ticket.data);
val->ticket.data = 0;
}
if (val->second_ticket.data) {
- krb5_xfree(val->second_ticket.data);
+ free(val->second_ticket.data);
val->second_ticket.data = 0;
}
if (val->addresses) {
krb5_free_principal(context, (*temp)->server);
if ((*temp)->caddrs)
krb5_free_addresses(context, (*temp)->caddrs);
- krb5_xfree((*temp));
+ free((*temp));
}
- krb5_xfree(val->ticket_info);
+ free(val->ticket_info);
val->ticket_info = 0;
}
}
krb5_free_creds(krb5_context context, krb5_creds *val)
{
krb5_free_cred_contents(context, val);
- krb5_xfree(val);
+ free(val);
}
krb5_free_data(krb5_context context, krb5_data *val)
{
if (val->data)
- krb5_xfree(val->data);
- krb5_xfree(val);
+ free(val->data);
+ free(val);
}
void KRB5_CALLCONV
krb5_free_data_contents(krb5_context context, krb5_data *val)
{
if (val->data) {
- krb5_xfree(val->data);
+ free(val->data);
val->data = 0;
}
}
krb5_free_principal(context, val->server);
if (val->caddrs)
krb5_free_addresses(context, val->caddrs);
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
if (val->client)
krb5_free_principal(context, val->client);
if (val->transited.tr_contents.data)
- krb5_xfree(val->transited.tr_contents.data);
+ free(val->transited.tr_contents.data);
if (val->caddrs)
krb5_free_addresses(context, val->caddrs);
if (val->authorization_data)
krb5_free_authdata(context, val->authorization_data);
- krb5_xfree(val);
+ free(val);
}
if (val->server)
krb5_free_principal(context, val->server);
if (val->text.data)
- krb5_xfree(val->text.data);
+ free(val->text.data);
if (val->e_data.data)
- krb5_xfree(val->e_data.data);
- krb5_xfree(val);
+ free(val->e_data.data);
+ free(val);
}
void KRB5_CALLCONV
if (val->ticket)
krb5_free_ticket(context, val->ticket);
if (val->enc_part.ciphertext.data)
- krb5_xfree(val->enc_part.ciphertext.data);
+ free(val->enc_part.ciphertext.data);
if (val->enc_part2)
krb5_free_enc_kdc_rep_part(context, val->enc_part2);
- krb5_xfree(val);
+ free(val);
}
if (val->server)
krb5_free_principal(context, val->server);
if (val->ktype)
- krb5_xfree(val->ktype);
+ free(val->ktype);
if (val->addresses)
krb5_free_addresses(context, val->addresses);
if (val->authorization_data.ciphertext.data)
- krb5_xfree(val->authorization_data.ciphertext.data);
+ free(val->authorization_data.ciphertext.data);
if (val->unenc_authdata)
krb5_free_authdata(context, val->unenc_authdata);
if (val->second_ticket)
krb5_free_tickets(context, val->second_ticket);
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
register krb5_last_req_entry **temp;
for (temp = val; *temp; temp++)
- krb5_xfree(*temp);
- krb5_xfree(val);
+ free(*temp);
+ free(val);
}
void KRB5_CALLCONV
for (temp = val; *temp; temp++) {
if ((*temp)->contents)
- krb5_xfree((*temp)->contents);
- krb5_xfree(*temp);
+ free((*temp)->contents);
+ free(*temp);
}
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
i = krb5_princ_size(context, val);
while(--i >= 0)
free(krb5_princ_component(context, val, i)->data);
- krb5_xfree(val->data);
+ free(val->data);
}
if (val->realm.data)
- krb5_xfree(val->realm.data);
- krb5_xfree(val);
+ free(val->realm.data);
+ free(val);
}
void KRB5_CALLCONV
krb5_free_priv(krb5_context context, register krb5_priv *val)
{
if (val->enc_part.ciphertext.data)
- krb5_xfree(val->enc_part.ciphertext.data);
- krb5_xfree(val);
+ free(val->enc_part.ciphertext.data);
+ free(val);
}
void KRB5_CALLCONV
krb5_free_priv_enc_part(krb5_context context, register krb5_priv_enc_part *val)
{
if (val->user_data.data)
- krb5_xfree(val->user_data.data);
+ free(val->user_data.data);
if (val->r_address)
krb5_free_address(context, val->r_address);
if (val->s_address)
krb5_free_address(context, val->s_address);
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
{
if (val->element)
krb5_free_pwd_sequences(context, val->element);
- krb5_xfree(val);
+ free(val);
}
krb5_free_data(context, (*temp)->phrase);
(*temp)->phrase = 0;
}
- krb5_xfree(*temp);
+ free(*temp);
}
- krb5_xfree(val);
+ free(val);
}
krb5_free_safe(krb5_context context, register krb5_safe *val)
{
if (val->user_data.data)
- krb5_xfree(val->user_data.data);
+ free(val->user_data.data);
if (val->r_address)
krb5_free_address(context, val->r_address);
if (val->s_address)
krb5_free_address(context, val->s_address);
if (val->checksum)
krb5_free_checksum(context, val->checksum);
- krb5_xfree(val);
+ free(val);
}
if (val->server)
krb5_free_principal(context, val->server);
if (val->enc_part.ciphertext.data)
- krb5_xfree(val->enc_part.ciphertext.data);
+ free(val->enc_part.ciphertext.data);
if (val->enc_part2)
krb5_free_enc_tkt_part(context, val->enc_part2);
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
for (temp = val; *temp; temp++)
krb5_free_ticket(context, *temp);
- krb5_xfree(val);
+ free(val);
}
register krb5_creds **tgtpp;
for (tgtpp = tgts; *tgtpp; tgtpp++)
krb5_free_creds(context, *tgtpp);
- krb5_xfree(tgts);
+ free(tgts);
}
void KRB5_CALLCONV
krb5_free_ticket(context, val->ticket);
if (val->authenticator)
krb5_free_authenticator(context, val->authenticator);
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
krb5_free_unparsed_name(krb5_context context, char *val)
{
if (val)
- krb5_xfree(val);
+ free(val);
}
void KRB5_CALLCONV
if (!sc)
return;
krb5_free_sam_challenge_contents(ctx, sc);
- krb5_xfree(sc);
+ free(sc);
}
void KRB5_CALLCONV
if (!sc2)
return;
krb5_free_sam_challenge_2_contents(ctx, sc2);
- krb5_xfree(sc2);
+ free(sc2);
}
void KRB5_CALLCONV
if (sc->sam_pk_for_sad.data)
krb5_free_data_contents(ctx, &sc->sam_pk_for_sad);
if (sc->sam_cksum.contents) {
- krb5_xfree(sc->sam_cksum.contents);
+ free(sc->sam_cksum.contents);
sc->sam_cksum.contents = 0;
}
}
krb5_free_checksum(ctx, *cksump);
cksump++;
}
- krb5_xfree(sc2->sam_cksum);
+ free(sc2->sam_cksum);
sc2->sam_cksum = 0;
}
}
if (!sc2)
return;
krb5_free_sam_challenge_2_body_contents(ctx, sc2);
- krb5_xfree(sc2);
+ free(sc2);
}
void KRB5_CALLCONV
if (!sr)
return;
krb5_free_sam_response_contents(ctx, sr);
- krb5_xfree(sr);
+ free(sr);
}
void KRB5_CALLCONV
if (!sr2)
return;
krb5_free_sam_response_2_contents(ctx, sr2);
- krb5_xfree(sr2);
+ free(sr2);
}
void KRB5_CALLCONV
if (!psr)
return;
krb5_free_predicted_sam_response_contents(ctx, psr);
- krb5_xfree(psr);
+ free(psr);
}
void KRB5_CALLCONV
if (!esre)
return;
krb5_free_enc_sam_response_enc_contents(ctx, esre);
- krb5_xfree(esre);
+ free(esre);
}
void KRB5_CALLCONV
if (!esre2)
return;
krb5_free_enc_sam_response_enc_2_contents(ctx, esre2);
- krb5_xfree(esre2);
+ free(esre2);
}
void KRB5_CALLCONV
{
if (!pa_enc_ts)
return;
- krb5_xfree(pa_enc_ts);
+ free(pa_enc_ts);
}
void KRB5_CALLCONV
}
krb5_free_checksum_contents(context, &req->cksum);
krb5_free_data_contents(context, &req->auth_package);
- krb5_xfree(req);
+ free(req);
}
void KRB5_CALLCONV
ref->requested_principal_name = NULL;
}
krb5_free_checksum_contents(context, &ref->rep_cksum);
- krb5_xfree(ref);
+ free(ref);
}
void KRB5_CALLCONV
krb5_free_principal(context, ref->principal);
ref->principal = NULL;
}
- krb5_xfree(ref);
+ free(ref);
}
void KRB5_CALLCONV
{
if (req == NULL)
return;
- krb5_xfree(req);
+ free(req);
}
void KRB5_CALLCONV
{
if (etypes != NULL) {
if (etypes->etypes != NULL)
- krb5_xfree(etypes->etypes);
- krb5_xfree(etypes);
+ free(etypes->etypes);
+ free(etypes);
}
}
if (pkeyblock == NULL) {
pencdata->ciphertext.data = scratch->data;
pencdata->ciphertext.length = scratch->length;
- krb5_xfree(scratch);
+ free(scratch);
return 0;
}
replay.ctime = replaydata.timestamp;
if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
/* should we really error out here? XXX */
- krb5_xfree(replay.client);
+ free(replay.client);
goto error;
}
- krb5_xfree(replay.client);
+ free(replay.client);
}
/* Encode creds structure */
if ((retval = encode_krb5_error(dec_err, &new_enc_err)))
return(retval);
*enc_err = *new_enc_err;
- krb5_xfree(new_enc_err);
+ free(new_enc_err);
return 0;
}
goto clean_encpart;
*outbuf = *scratch2;
- krb5_xfree(scratch2);
+ free(scratch2);
retval = 0;
clean_encpart:
if ((retval = krb5_gen_replay_name(context, auth_context->local_addr,
"_priv", &replay.client))) {
- krb5_xfree(outbuf);
+ free(outbuf);
goto error;
}
replay.ctime = replaydata.timestamp;
if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
/* should we really error out here? XXX */
- krb5_xfree(replay.client);
+ free(replay.client);
goto error;
}
- krb5_xfree(replay.client);
+ free(replay.client);
}
return 0;
if (!(retval = encode_krb5_ap_rep(&reply, &toutbuf))) {
*outbuf = *toutbuf;
- krb5_xfree(toutbuf);
+ free(toutbuf);
}
memset(reply.enc_part.ciphertext.data, 0, reply.enc_part.ciphertext.length);
goto cleanup_cksum;
*outbuf = *toutbuf;
- krb5_xfree(toutbuf);
+ free(toutbuf);
cleanup_cksum:
if (checksump && checksump->checksum_type != 0x8003)
cleanup:
if (desired_etypes &&
desired_etypes != (*auth_context)->permitted_etypes)
- krb5_xfree(desired_etypes);
+ free(desired_etypes);
if (request.ticket)
krb5_free_ticket(context, request.ticket);
if (request.authenticator.ciphertext.data) {
}
if (scratch) {
memset(scratch->data, 0, scratch->length);
- krb5_xfree(scratch->data);
- krb5_xfree(scratch);
+ free(scratch->data);
+ free(scratch);
}
return retval;
}
adata[i]->ad_type = KRB5_AUTHDATA_IF_RELEVANT;
adata[i]->length = ad_if_relevant->length;
adata[i]->contents = (krb5_octet *)ad_if_relevant->data;
- krb5_xfree(ad_if_relevant); /* contents owned by adata[i] */
+ free(ad_if_relevant); /* contents owned by adata[i] */
adata[i + 1] = NULL;
goto cleanup_checksum;
}
*outbuf = *scratch2;
- krb5_xfree(scratch2);
+ free(scratch2);
retval = 0;
cleanup_checksum:
- krb5_xfree(safe_checksum.contents);
+ free(safe_checksum.contents);
memset((char *)scratch1->data, 0, scratch1->length);
krb5_free_data(context, scratch1);
if ((retval = krb5_gen_replay_name(context, auth_context->local_addr,
"_safe", &replay.client))) {
- krb5_xfree(outbuf);
+ free(outbuf);
goto error;
}
replay.ctime = replaydata.timestamp;
if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
/* should we really error out here? XXX */
- krb5_xfree(outbuf);
+ free(outbuf);
goto error;
}
- krb5_xfree(replay.client);
+ free(replay.client);
}
return 0;
}
principal->data = (krb5_data *) malloc(sizeof(krb5_data) * components);
if (principal->data == NULL) {
- krb5_xfree((char *)principal);
+ free((char *)principal);
return ENOMEM;
}
principal->length = components;
if (flags & KRB5_PRINCIPAL_PARSE_REQUIRE_REALM) {
krb5_set_error_message(context, KRB5_PARSE_MALFORMED,
"Principal %s is missing required realm", name);
- krb5_xfree(principal->data);
- krb5_xfree(principal);
+ free(principal->data);
+ free(principal);
return KRB5_PARSE_MALFORMED;
}
if (!default_realm && (flags & KRB5_PRINCIPAL_PARSE_NO_REALM) == 0) {
retval = krb5_get_default_realm(context, &default_realm);
if (retval) {
- krb5_xfree(principal->data);
- krb5_xfree((char *)principal);
+ free(principal->data);
+ free((char *)principal);
return(retval);
}
default_realm_size = strlen(default_realm);
} else if (flags & KRB5_PRINCIPAL_PARSE_NO_REALM) {
krb5_set_error_message(context, KRB5_PARSE_MALFORMED,
"Principal %s has realm present", name);
- krb5_xfree(principal->data);
- krb5_xfree(principal);
+ free(principal->data);
+ free(principal);
return KRB5_PARSE_MALFORMED;
}
*/
tmpdata = malloc(realmsize + 1);
if (tmpdata == 0) {
- krb5_xfree(principal->data);
- krb5_xfree(principal);
- krb5_xfree(default_realm);
+ free(principal->data);
+ free(principal);
+ free(default_realm);
return ENOMEM;
}
krb5_princ_set_realm_length(context, principal, realmsize);
malloc(krb5_princ_component(context, principal, i)->length + 1);
if (tmpdata2 == NULL) {
for (i--; i >= 0; i--)
- krb5_xfree(krb5_princ_component(context, principal, i)->data);
- krb5_xfree(krb5_princ_realm(context, principal)->data);
- krb5_xfree(principal->data);
- krb5_xfree(principal);
- krb5_xfree(default_realm);
+ free(krb5_princ_component(context, principal, i)->data);
+ free(krb5_princ_realm(context, principal)->data);
+ free(principal->data);
+ free(principal);
+ free(default_realm);
return(ENOMEM);
}
krb5_princ_component(context, principal, i)->data = tmpdata2;
*nprincipal = principal;
if (default_realm != NULL)
- krb5_xfree(default_realm);
+ free(default_realm);
return(0);
}
if (etype_info)
krb5_free_etype_info(context, etype_info);
if (f_salt)
- krb5_xfree(salt.data);
+ free(salt.data);
if (send_pa_list)
krb5_free_pa_data(context, send_pa_list);
if (def_enc_key)
*out_padata = pa;
- krb5_xfree(scratch);
+ free(scratch);
scratch = 0;
retval = 0;
if (scratch)
krb5_free_data(context, scratch);
if (enc_data.ciphertext.data)
- krb5_xfree(enc_data.ciphertext.data);
+ free(enc_data.ciphertext.data);
return retval;
}
/* we don't keep the new password, just the key... */
retval = (*key_proc)(context, enctype, 0,
(krb5_const_pointer)&newpw, new_enc_key);
- krb5_xfree(newpw.data);
+ free(newpw.data);
}
krb5_default_pwd_prompt1 = oldprompt;
return retval;
if (scratch)
krb5_free_data(context, scratch);
if (sam_challenge)
- krb5_xfree(sam_challenge);
+ free(sam_challenge);
return retval;
}
krb5_free_data(context, tmp);
if (ret) {
- krb5_xfree(enc_data.ciphertext.data);
+ free(enc_data.ciphertext.data);
return(ret);
}
ret = encode_krb5_enc_data(&enc_data, &tmp);
- krb5_xfree(enc_data.ciphertext.data);
+ free(enc_data.ciphertext.data);
if (ret)
return(ret);
*out_padata = pa;
- krb5_xfree(tmp);
+ free(tmp);
return(0);
}
(krb5_data *)gak_data, salt, as_key);
if (defsalt.length)
- krb5_xfree(defsalt.data);
+ free(defsalt.data);
if (ret) {
krb5_free_sam_challenge(context, sam_challenge);
&response_data, salt, as_key);
if (defsalt.length)
- krb5_xfree(defsalt.data);
+ free(defsalt.data);
if (ret) {
krb5_free_sam_challenge(context, sam_challenge);
sam_response.sam_type = sam_challenge->sam_type;
sam_response.magic = KV5M_SAM_RESPONSE;
- krb5_xfree(sam_challenge);
+ free(sam_challenge);
/* encode the encoded part of the response */
if ((ret = encode_krb5_enc_sam_response_enc(&enc_sam_response_enc,
*out_padata = pa;
- krb5_xfree(scratch);
+ free(scratch);
return(0);
}
if (retval) {
krb5_free_sam_challenge_2(context, sc2);
krb5_free_sam_challenge_2_body(context, sc2b);
- if (defsalt.length) krb5_xfree(defsalt.data);
+ if (defsalt.length) free(defsalt.data);
return(retval);
}
if (retval) {
krb5_free_sam_challenge_2(context, sc2);
krb5_free_sam_challenge_2_body(context, sc2b);
- if (defsalt.length) krb5_xfree(defsalt.data);
+ if (defsalt.length) free(defsalt.data);
return(retval);
}
if (retval) {
krb5_free_sam_challenge_2(context, sc2);
krb5_free_sam_challenge_2_body(context, sc2b);
- if (defsalt.length) krb5_xfree(defsalt.data);
+ if (defsalt.length) free(defsalt.data);
return(retval);
}
krb5_free_keyblock_contents(context, &tmp_kb);
}
if (defsalt.length)
- krb5_xfree(defsalt.data);
+ free(defsalt.data);
} else {
/* as_key = string_to_key(SAD) */
&response_data, salt, as_key);
if (defsalt.length)
- krb5_xfree(defsalt.data);
+ free(defsalt.data);
if (retval) {
krb5_free_sam_challenge_2(context, sc2);
cleanup:
if (ppart != NULL) {
memset(ppart, 0, sizeof(*ppart));
- krb5_xfree(ppart);
+ free(ppart);
}
memset(scratch.data, 0, scratch.length);
- krb5_xfree(scratch.data);
+ free(scratch.data);
return retval;
}
goto cleanup;
pcur->ticket = *pdata;
- krb5_xfree(pdata);
+ free(pdata);
pcur->is_skey = FALSE;
replay.cusec = replaydata.usec;
replay.ctime = replaydata.timestamp;
if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
- krb5_xfree(replay.client);
+ free(replay.client);
goto error;
}
- krb5_xfree(replay.client);
+ free(replay.client);
}
if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {
cleanup_scratch:;
memset(scratch.data, 0, scratch.length);
- krb5_xfree(scratch.data);
+ free(scratch.data);
cleanup_privmsg:;
- krb5_xfree(privmsg->enc_part.ciphertext.data);
- krb5_xfree(privmsg);
+ free(privmsg->enc_part.ciphertext.data);
+ free(privmsg);
return retval;
}
replay.cusec = replaydata.usec;
replay.ctime = replaydata.timestamp;
if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
- krb5_xfree(replay.client);
+ free(replay.client);
goto error;
}
- krb5_xfree(replay.client);
+ free(replay.client);
}
if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {
return 0;
error:;
- krb5_xfree(outbuf->data);
+ free(outbuf->data);
outbuf->length = 0;
outbuf->data = NULL;
&rep.msghash);
if (!retval) {
retval = krb5_rc_store(context, (*auth_context)->rcache, &rep);
- krb5_xfree(rep.msghash);
+ free(rep.msghash);
}
- krb5_xfree(rep.server);
- krb5_xfree(rep.client);
+ free(rep.server);
+ free(rep.client);
}
if (retval)
cleanup:
if (desired_etypes != NULL)
- krb5_xfree(desired_etypes);
+ free(desired_etypes);
if (permitted_etypes != NULL &&
permitted_etypes != (*auth_context)->permitted_etypes)
- krb5_xfree(permitted_etypes);
+ free(permitted_etypes);
if (server == &princ_data)
krb5_free_default_realm(context, princ_data.realm.data);
if (retval) {
if (code == 0) {
*desired_etypes = etype_list->etypes;
*desired_etypes_len = etype_list->length;
- krb5_xfree(etype_list);
+ free(etype_list);
}
if (ad_if_relevant != NULL)
replay.cusec = replaydata.usec;
replay.ctime = replaydata.timestamp;
if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
- krb5_xfree(replay.client);
+ free(replay.client);
goto error;
}
- krb5_xfree(replay.client);
+ free(replay.client);
}
if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {
return 0;
error:
- krb5_xfree(outbuf->data);
+ free(outbuf->data);
return retval;
}
if (strcmp(inbuf.data, sendauth_version)) {
problem = KRB5_SENDAUTH_BADAUTHVERS;
}
- krb5_xfree(inbuf.data);
+ free(inbuf.data);
}
if (flags & KRB5_RECVAUTH_BADAUTHVERS)
problem = KRB5_SENDAUTH_BADAUTHVERS;
if (version && !problem)
*version = inbuf;
else
- krb5_xfree(inbuf.data);
+ free(inbuf.data);
/*
* OK, now check the problem variable. If it's zero, we're
* fine and we can continue. Otherwise, we have to signal an
if (!problem) {
problem = krb5_rd_req(context, auth_context, &inbuf, server,
keytab, &ap_option, ticket);
- krb5_xfree(inbuf.data);
+ free(inbuf.data);
}
/*
retval = krb5_write_message(context, fd, &outbuf);
if (outbuf.data) {
- krb5_xfree(outbuf.data);
+ free(outbuf.data);
/* We sent back an error, we need cleanup then return */
retval = problem;
goto cleanup;
return(retval);
}
retval = krb5_write_message(context, fd, &outbuf);
- krb5_xfree(outbuf.data);
+ free(outbuf.data);
}
cleanup:;
retval = encode_krb5_ap_req(&request, &toutbuf);
*outbuf = *toutbuf;
- krb5_xfree(toutbuf);
+ free(toutbuf);
memset(request.authenticator.ciphertext.data, 0,
KRB5_KEYUSAGE_TGS_REQ_AD_SESSKEY,
scratch,
&tgsreq.authorization_data))) {
- krb5_xfree(tgsreq.authorization_data.ciphertext.data);
+ free(tgsreq.authorization_data.ciphertext.data);
krb5_free_data(context, scratch);
return retval;
}
for (counter = padata; *counter; counter++, i++);
combined_padata = malloc((i+2) * sizeof(*combined_padata));
if (!combined_padata) {
- krb5_xfree(ap_req_padata.contents);
+ free(ap_req_padata.contents);
retval = ENOMEM;
goto send_tgs_error_2;
}
} else {
combined_padata = (krb5_pa_data **)malloc(2*sizeof(*combined_padata));
if (!combined_padata) {
- krb5_xfree(ap_req_padata.contents);
+ free(ap_req_padata.contents);
retval = ENOMEM;
goto send_tgs_error_2;
}
/* the TGS_REQ is assembled in tgsreq, so encode it */
if ((retval = encode_krb5_tgs_req(&tgsreq, &scratch))) {
- krb5_xfree(ap_req_padata.contents);
- krb5_xfree(combined_padata);
+ free(ap_req_padata.contents);
+ free(combined_padata);
goto send_tgs_error_2;
}
- krb5_xfree(ap_req_padata.contents);
- krb5_xfree(combined_padata);
+ free(ap_req_padata.contents);
+ free(combined_padata);
/* now send request & get response from KDC */
send_again:
send_tgs_error_1:;
if (ktypes == NULL)
- krb5_xfree(tgsreq.ktype);
+ free(tgsreq.ktype);
if (tgsreq.authorization_data.ciphertext.data) {
memset(tgsreq.authorization_data.ciphertext.data, 0,
tgsreq.authorization_data.ciphertext.length);
- krb5_xfree(tgsreq.authorization_data.ciphertext.data);
+ free(tgsreq.authorization_data.ciphertext.data);
}
return retval;
if (inbuf.length) {
if (error) {
if ((retval = krb5_rd_error(context, &inbuf, error))) {
- krb5_xfree(inbuf.data);
+ free(inbuf.data);
goto error_return;
}
}
retval = KRB5_SENDAUTH_REJECTED;
- krb5_xfree(inbuf.data);
+ free(inbuf.data);
goto error_return;
}
&repl))) {
if (repl)
krb5_free_ap_rep_enc_part(context, repl);
- krb5_xfree(inbuf.data);
+ free(inbuf.data);
goto error_return;
}
- krb5_xfree(inbuf.data);
+ free(inbuf.data);
/*
* If the user wants to look at the AP_REP message,
* copy it for him
if ((principal = (krb5_principal) arg) &&
!(kret = krb5_unparse_name(kcontext, principal, &fname))) {
*sizep += (3*sizeof(krb5_int32)) + strlen(fname);
- krb5_xfree(fname);
+ free(fname);
}
return(kret);
}
*buffer = bp;
*lenremain = remain;
- krb5_xfree(fname);
+ free(fname);
}
}
}
/* Copy in new entry */
memcpy(&stable[kcontext->ser_ctx_count], entry,
sizeof(krb5_ser_entry));
- if (kcontext->ser_ctx) krb5_xfree(kcontext->ser_ctx);
+ if (kcontext->ser_ctx) free(kcontext->ser_ctx);
kcontext->ser_ctx = (void *) stable;
kcontext->ser_ctx_count++;
}
if (!newrealm)
return -ENOMEM;
- (void) krb5_xfree(krb5_princ_realm(context,principal)->data);
+ (void) free(krb5_princ_realm(context,principal)->data);
krb5_princ_realm(context, principal)->length = length;
krb5_princ_realm(context, principal)->data = newrealm;
cleanup:
if (rcache)
- krb5_xfree(rcache);
+ free(rcache);
if (cachename)
- krb5_xfree(cachename);
+ free(cachename);
return retval;
}
if (verbose)
printf("%s: compare succeeded\n", msg);
}
- krb5_xfree(outrep2);
+ free(outrep2);
}
else
printf("%s: second externalize returned %d\n", msg, kret);
actx = (krb5_auth_context) nctx;
if (actx->i_vector)
- krb5_xfree(actx->i_vector);
+ free(actx->i_vector);
}
krb5_auth_con_free(ser_ctx, (krb5_auth_context) nctx);
break;
eblock = (krb5_encrypt_block *) nctx;
#if 0
if (eblock->priv && eblock->priv_size)
- krb5_xfree(eblock->priv);
+ free(eblock->priv);
#endif
if (eblock->key)
krb5_free_keyblock(ser_ctx, eblock->key);
- krb5_xfree(eblock);
+ free(eblock);
}
break;
case KV5M_PRINCIPAL:
}
else
printf("%s: internalize returned %d\n", msg, kret);
- krb5_xfree(outrep);
+ free(outrep);
}
else
printf("%s: externalize_data returned %d\n", msg, kret);
!(kret = ser_data(verbose, "> Auth context with new vector",
(krb5_pointer) actx,
KV5M_AUTH_CONTEXT)) &&
- (krb5_xfree(actx->i_vector), actx->i_vector) &&
+ (free(actx->i_vector), actx->i_vector) &&
!(kret = krb5_auth_con_setivector(kcontext, actx,
(krb5_pointer) print_erep)
) &&
if (authcon)
krb5_auth_con_free(context, authcon);
if (ap_req.data)
- krb5_xfree(ap_req.data);
+ free(ap_req.data);
return(ret);
}
db = KDBM_OPEN(dbname, O_RDONLY, 0600);
if (!db) {
- krb5_xfree(princ_name);
+ free(princ_name);
return KRB5_LNAME_CANTOPEN;
}
contents = KDBM_FETCH(db, key);
- krb5_xfree(princ_name);
+ free(princ_name);
if (contents.dptr == NULL) {
retval = KRB5_LNAME_NOTRANS;
if (!(selstring = aname_full_to_mapping_name(fprincname)))
kret = ENOMEM;
}
- krb5_xfree(fprincname);
+ free(fprincname);
}
if (!kret) {
/*
}
else
kret = ENOMEM;
- krb5_xfree(pname);
+ free(pname);
}
- krb5_xfree(realm);
+ free(realm);
}
return(kret);
}
for (cp = hostlist; *cp; cp++)
free(*cp);
- krb5_xfree(hostlist);
+ free((char *)hostlist);
return 0;
}
2*sizeof(temptype) + 2*sizeof(templength);
if (!(retaddr->contents = (krb5_octet *)malloc(retaddr->length))) {
- krb5_xfree(retaddr);
+ free(retaddr);
return ENOMEM;
}
marshal = retaddr->contents;
int i;
if (data.addr_temp) {
for (i = 0; i < data.count; i++)
- krb5_xfree (data.addr_temp[i]);
+ free (data.addr_temp[i]);
free (data.addr_temp);
}
if (data.mem_err)
error_message(code));
if (code == PROF_NO_SECTION || code == PROF_NO_RELATION)
code = KRB5_REALM_UNKNOWN;
- krb5_xfree(host);
+ free(host);
return code;
}
if (count == 0) {
profile_free_list(hostlist);
- krb5_xfree(host);
+ free(host);
addrlist->naddrs = 0;
return 0;
}
code = profile_get_values(context->profile, realm_srv_names,
&masterlist);
- krb5_xfree(host);
+ free(host);
if (code == 0) {
for (i=0; masterlist[i]; i++) {
}
}
} else {
- krb5_xfree(host);
+ free(host);
}
/* at this point, if master is non-NULL, then either the master kdc
return(ENOMEM);
}
if ((len2 = krb5_net_read(context, fd, buf, ilen)) != ilen) {
- krb5_xfree(buf);
+ free(buf);
return((len2 < 0) ? errno : ECONNABORTED);
}
}
if (!hrealms[0]) {
free(remote_host);
- krb5_xfree(hrealms);
+ free(hrealms);
return KRB5_ERR_HOST_REALM_UNKNOWN;
}
realm = hrealms[0];
cleanup:
if (t) {
if (t->name)
- krb5_xfree(t->name);
+ free(t->name);
if (t->h)
- krb5_xfree(t->h);
- krb5_xfree(t);
+ free(t->h);
+ free(t);
}
return retval;
}
errout:
if (rep->client)
- krb5_xfree(rep->client);
+ free(rep->client);
if (rep->server)
- krb5_xfree(rep->server);
+ free(rep->server);
if (rep->msghash)
- krb5_xfree(rep->msghash);
+ free(rep->msghash);
rep->client = rep->server = 0;
return retval;
}
setup(krb5_cred_enc_part,"krb5_cred_enc_part",ktest_make_sample_cred_enc_part);
decode_run("enc_cred_part","","7D 82 02 23 30 82 02 1F A0 82 01 DA 30 82 01 D6 30 81 E8 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 A3 07 03 05 00 FE DC BA 98 A4 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A8 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A9 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 AA 20 30 1E 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 81 E8 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 A3 07 03 05 00 FE DC BA 98 A4 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A8 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A9 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 AA 20 30 1E 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 A1 03 02 01 2A A2 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A3 05 02 03 01 E2 40 A4 0F 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 A5 0F 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23",decode_krb5_enc_cred_part,ktest_equal_enc_cred_part,krb5_free_cred_enc_part);
/* free_cred_enc_part does not free the pointer */
- krb5_xfree(var);
+ free(var);
ktest_destroy_principal(&(ref.ticket_info[0]->client));
ktest_destroy_principal(&(ref.ticket_info[0]->server));
ref.ticket_info[0]->flags = 0;
ktest_destroy_address(&(ref.r_address));
decode_run("enc_cred_part","(optionals NULL)","7D 82 01 0E 30 82 01 0A A0 82 01 06 30 82 01 02 30 15 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 30 81 E8 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 A3 07 03 05 00 FE DC BA 98 A4 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A8 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A9 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 AA 20 30 1E 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23",decode_krb5_enc_cred_part,ktest_equal_enc_cred_part,krb5_free_cred_enc_part);
/* free_cred_enc_part does not free the pointer */
- krb5_xfree(var);
+ free(var);
ktest_empty_cred_enc_part(&ref);
}
void krb5_ktest_free_alt_method(krb5_context context, krb5_alt_method *val)
{
if (val->data)
- krb5_xfree(val->data);
- krb5_xfree(val);
+ free(val->data);
+ free(val);
}
void krb5_ktest_free_pwd_sequence(krb5_context context,
{
krb5_free_data(context, val->passwd);
krb5_free_data(context, val->phrase);
- krb5_xfree(val);
+ free(val);
}
void krb5_ktest_free_enc_data(krb5_context context, krb5_enc_data *val)