krb5_free_principal(entry.principal);
krb5_free_principal(entry.mod_name);
- xfree(ekey.contents);
+ krb5_xfree(ekey.contents);
return retval;
}
if (retval = krb5_db_put_principal(&entry, &nentries))
return retval;
- xfree(ekey.contents);
+ krb5_xfree(ekey.contents);
return 0;
}
if (retval = krb5_db_put_principal(&entry, &nentries))
return retval;
- xfree(ekey.contents);
+ krb5_xfree(ekey.contents);
return 0;
}
free(name);
free(mod_name);
if (entry.key.contents)
- xfree(entry.key.contents);
+ krb5_xfree(entry.key.contents);
if (entry.alt_key.contents)
- xfree(entry.alt_key.contents);
+ krb5_xfree(entry.alt_key.contents);
if (entry.salt)
- xfree(entry.salt);
+ krb5_xfree(entry.salt);
if (entry.alt_salt)
- xfree(entry.alt_salt);
+ krb5_xfree(entry.alt_salt);
}
error_out:
if (retval = krb5_db_fini()) {
if (retval = krb5_timeofday(&newentry.mod_date)) {
com_err(cmdname, retval, "while fetching date");
memset((char *)newentry.key.contents, 0, newentry.key.length);
- xfree(newentry.key.contents);
+ krb5_xfree(newentry.key.contents);
return;
}
newentry.attributes = mblock.flags;
retval = krb5_db_put_principal(&newentry, &one);
memset((char *)newentry.key.contents, 0, newentry.key.length);
- xfree(newentry.key.contents);
+ krb5_xfree(newentry.key.contents);
if (retval) {
com_err(cmdname, retval, "while storing entry for '%s'\n", newprinc);
return;
&master_random);
memset((char *)master_keyblock.contents, 0,
master_keyblock.length);
- xfree(master_keyblock.contents);
+ krb5_xfree(master_keyblock.contents);
master_keyblock.contents = NULL;
}
krb5_free_principal(master_princ);
&master_encblock)) {
com_err(pname, retval, "while verifying master key");
memset((char *)master_keyblock.contents, 0, master_keyblock.length);
- xfree(master_keyblock.contents);
+ krb5_xfree(master_keyblock.contents);
valid_master_key = 0;
dbactive = TRUE;
return(1);
&master_keyblock)) {
com_err(pname, retval, "while processing master key");
memset((char *)master_keyblock.contents, 0, master_keyblock.length);
- xfree(master_keyblock.contents);
+ krb5_xfree(master_keyblock.contents);
valid_master_key = 0;
dbactive = TRUE;
return(1);
com_err(pname, retval, "while initializing random key generator");
(void) krb5_finish_key(&master_encblock);
memset((char *)master_keyblock.contents, 0, master_keyblock.length);
- xfree(master_keyblock.contents);
+ krb5_xfree(master_keyblock.contents);
valid_master_key = 0;
dbactive = TRUE;
return(1);
printf("'%s' added to keytab '%s'\n",
pname, ktname);
memset((char *)newentry.key.contents, 0, newentry.key.length);
- xfree(newentry.key.contents);
+ krb5_xfree(newentry.key.contents);
cleanall:
krb5_db_free_principal(&dbentry, nentries);
cleanmost:
if (key.keytype != 1) {
com_err(argv[0], 0, "%s does not have a DES key!", pname);
memset((char *)key.contents, 0, key.length);
- xfree(key.contents);
+ krb5_xfree(key.contents);
continue;
}
fwrite(argv[i], strlen(argv[i]) + 1, 1, fout); /* p.name */
fwrite((char *)key.contents, 8, 1, fout);
printf("'%s' added to V4 srvtab '%s'\n", pname, ktname);
memset((char *)key.contents, 0, key.length);
- xfree(key.contents);
+ krb5_xfree(key.contents);
cleanall:
krb5_db_free_principal(&dbentry, nentries);
cleanmost:
return;
}
salt.saltdata = *foo;
- xfree(foo);
+ krb5_xfree(foo);
break;
}
default:
if (retval) {
com_err(cmdname, retval, "while converting password to key for '%s'",
newprinc);
- xfree(salt.saltdata.data);
+ krb5_xfree(salt.saltdata.data);
return;
}
add_key(cmdname, newprinc, princ, &tempkey, ++vno,
(salttype == KRB5_KDB_SALTTYPE_NORMAL) ? 0 : &salt);
- xfree(salt.saltdata.data);
+ krb5_xfree(salt.saltdata.data);
memset((char *)tempkey.contents, 0, tempkey.length);
- xfree(tempkey.contents);
+ krb5_xfree(tempkey.contents);
return;
}
}
if (!hrealms[0]) {
free(remote_host);
- xfree(hrealms);
+ krb5_xfree(hrealms);
return KRB5_ERR_HOST_REALM_UNKNOWN;
}
if (!(scratch->data = realloc(scratch->data,
ret_cred.enc_part.ciphertext.length))) {
/* may destroy scratch->data */
- xfree(scratch);
+ krb5_xfree(scratch);
return ENOMEM;
}
memset(scratch->data + scratch->length, 0,
cleanup_encpart();
*outbuf = *scratch;
- xfree(scratch);
+ krb5_xfree(scratch);
return 0;
clean_prockey:
return retval;
}
-#define cleanup_credmsg() {(void)xfree(credmsg->enc_part.ciphertext.data); (void)xfree(credmsg);}
+#define cleanup_credmsg() {(void)krb5_xfree(credmsg->enc_part.ciphertext.data); (void)krb5_xfree(credmsg);}
if (!(scratch = (krb5_data *) malloc(sizeof(*scratch)))) {
cleanup_credmsg();
return ENOMEM;
}
-#define cleanup_scratch() {(void)memset(scratch->data, 0, scratch->length); (void)xfree(scratch->data);}
+#define cleanup_scratch() {(void)memset(scratch->data, 0, scratch->length); (void)krb5_xfree(scratch->data);}
if (retval = encode_krb5_ticket(credmsg->tickets[0], &scratch)) {
cleanup_credmsg();
creds->ticket = *scratch;
if (!(creds->ticket.data = malloc(scratch->length))) {
- xfree(creds->ticket.data);
+ krb5_xfree(creds->ticket.data);
return ENOMEM;
}
memcpy((char *)creds->ticket.data, (char *) scratch->data, scratch->length);
}
cleanup_scratch();
-#define cleanup_mesg() {(void)xfree(credmsg_enc_part);}
+#define cleanup_mesg() {(void)krb5_xfree(credmsg_enc_part);}
if (retval = krb5_timeofday(¤ttime)) {
cleanup_mesg();
#ifndef sgi
sigsetmask(oldmask);
#endif
- if (tmpstr) xfree(tmpstr);
- if (host_save) xfree(host_save);
+ if (tmpstr) krb5_xfree(tmpstr);
+ if (host_save) krb5_xfree(host_save);
krb5_free_creds(ret_cred);
return (-1);
}
#ifndef sgi
sigsetmask(oldmask);
#endif
- if (tmpstr) xfree(tmpstr);
- if (host_save) xfree(host_save);
+ if (tmpstr) krb5_xfree(tmpstr);
+ if (host_save) krb5_xfree(host_save);
krb5_free_creds(ret_cred);
return (-1);
}
sigsetmask(oldmask);
#endif
*sock = s;
- if (tmpstr) xfree(tmpstr);
- if (host_save) xfree(host_save);
+ if (tmpstr) krb5_xfree(tmpstr);
+ if (host_save) krb5_xfree(host_save);
/* pass back credentials if wanted */
if (cred) krb5_copy_creds(ret_cred,cred);
#ifndef sgi
sigsetmask(oldmask);
#endif
- if (tmpstr) xfree(tmpstr);
- if (host_save) xfree(host_save);
+ if (tmpstr) krb5_xfree(tmpstr);
+ if (host_save) krb5_xfree(host_save);
if (ret_cred)
krb5_free_creds(ret_cred);
return (status);
error_message(status));
exit(1);
}
- xfree(princ);
+ krb5_xfree(princ);
status = krb5_write_message((krb5_pointer) &rem, &creds.ticket);
if (status){
fprintf(stderr,
keyproc */
0, /* no rcache for the moment XXX */
&authdat);
- xfree(reply.data);
+ krb5_xfree(reply.data);
if (status) {
fprintf(stderr, "rcp: send_auth failed krb5_rd_req: %s\n",
error_message(status));
krb5_cc_close(cc);
exit(1);
}
- xfree(pname_data.data);
+ krb5_xfree(pname_data.data);
if (status = krb5_get_credentials(KRB5_GC_USER_USER, cc, &creds)){
krb5_cc_destroy(cc);
krb5_cc_destroy(cc);
krb5_cc_close(cc);
status = krb5_write_message((krb5_pointer) &rem, &msg);
- xfree(msg.data);
+ krb5_xfree(msg.data);
if (status){
exit(1);
}
if ((len = krb5_net_read(netf, inbuf.data, inbuf.length)) !=
inbuf.length) {
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
return((len < 0) ? errno : ECONNABORTED);
}
if (strcmp(inbuf.data, "KRB5_SENDAUTH_V1.0")) {
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
status = KRB5_SENDAUTH_BADAUTHVERS;
return status;
}
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
#ifdef unicos61
#define SIZEOF_INADDR SIZEOF_in_addr
if (retval = krb5_read_message(fd, &inbuf))
return(retval);
if (strcmp(inbuf.data, appl_version)) {
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
if (!problem)
problem = KRB5_SENDAUTH_BADAPPLVERS;
}
- xfree(inbuf.data);
+ krb5_xfree(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(&inbuf, server, sender_addr, fetch_from,
keyproc, keyprocarg, rcache, &authdat);
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
#ifdef WORKING_RCACHE
if (rcache)
retval = krb5_rc_close(rcache);
}
if (retval = krb5_write_message(fd, &outbuf)) {
if (outbuf.data)
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
if (!problem)
krb5_free_tkt_authent(authdat);
return(retval);
return(retval);
}
if (retval = krb5_write_message(fd, &outbuf)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
krb5_free_tkt_authent(authdat);
return(retval);
}
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
}
/*
* At this point, we've won. We just need to copy whatever
*authent = authdat->authenticator;
else
krb5_free_authenticator(authdat->authenticator);
- xfree(authdat);
+ krb5_xfree(authdat);
return 0;
}
if ((len = krb5_net_read(netf, inbuf.data, inbuf.length)) !=
inbuf.length) {
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
return((len < 0) ? errno : ECONNABORTED);
}
if (strcmp(inbuf.data, "KRB5_SENDAUTH_V1.0")) {
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
status = KRB5_SENDAUTH_BADAUTHVERS;
return status;
}
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
#ifdef unicos61
#define SIZEOF_INADDR SIZEOF_in_addr
if (retval = krb5_read_message(fd, &inbuf))
return(retval);
if (strcmp(inbuf.data, appl_version)) {
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
if (!problem)
problem = KRB5_SENDAUTH_BADAPPLVERS;
}
- xfree(inbuf.data);
+ krb5_xfree(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(&inbuf, server, sender_addr, fetch_from,
keyproc, keyprocarg, rcache, &authdat);
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
#ifdef WORKING_RCACHE
if (rcache)
retval = krb5_rc_close(rcache);
}
if (retval = krb5_write_message(fd, &outbuf)) {
if (outbuf.data)
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
if (!problem)
krb5_free_tkt_authent(authdat);
return(retval);
return(retval);
}
if (retval = krb5_write_message(fd, &outbuf)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
krb5_free_tkt_authent(authdat);
return(retval);
}
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
}
/*
*authent = authdat->authenticator;
else
krb5_free_authenticator(authdat->authenticator);
- xfree(authdat);
+ krb5_xfree(authdat);
return 0;
}
com_err(PROGNAME, errno, "while sending KRB_AP_REQ message");
printf("Sent authentication data: %d bytes\n", i);
- xfree(packet.data);
+ krb5_xfree(packet.data);
/* PREPARE KRB_SAFE MESSAGE */
/* Get my address */
exit(1);
}
if (retval = krb5_rc_resolve_type(&rcache, krb5_rc_default_type())) {
- xfree(rcache);
+ krb5_xfree(rcache);
com_err(PROGNAME, retval, "while resolving replay cache type");
exit(1);
}
if (retval = krb5_rc_resolve(rcache, cp)) {
- xfree(rcache);
+ krb5_xfree(rcache);
com_err(PROGNAME, retval, "while resolving replay cache type");
exit(1);
}
com_err(PROGNAME, errno, "while sending SAFE message");
printf("Sent checksummed message: %d bytes\n", i);
- xfree(packet.data);
+ krb5_xfree(packet.data);
/* PREPARE KRB_PRIV MESSAGE */
&message)) {
com_err(PROGNAME, retval, "while verifying SAFE message");
(void) krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
exit(1);
}
printf("Safe message is: '%.*s'\n", message.length, message.data);
- xfree(message.data);
+ krb5_xfree(message.data);
krb5_free_address(portforeign_addr);
/* NOW GET ENCRYPTED MESSAGE */
if (i < 0) {
perror("receiving datagram");
(void) krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
exit(1);
}
printf("Received %d bytes\n", i);
&portforeign_addr)) {
com_err(PROGNAME, retval, "while generating port address");
(void) krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
exit(1);
}
&message)) {
com_err(PROGNAME, retval, "while verifying PRIV message");
(void) krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
exit(1);
}
printf("Decrypted message is: '%.*s'\n", message.length, message.data);
(void) krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
exit(0);
}
}
if (!hrealms[0]) {
free(remote_host);
- xfree(hrealms);
+ krb5_xfree(hrealms);
return KRB5_ERR_HOST_REALM_UNKNOWN;
}
if (!(scratch->data = realloc(scratch->data,
ret_cred.enc_part.ciphertext.length))) {
/* may destroy scratch->data */
- xfree(scratch);
+ krb5_xfree(scratch);
return ENOMEM;
}
memset(scratch->data + scratch->length, 0,
cleanup_encpart();
*outbuf = *scratch;
- xfree(scratch);
+ krb5_xfree(scratch);
return 0;
clean_prockey:
return retval;
}
-#define cleanup_credmsg() {(void)xfree(credmsg->enc_part.ciphertext.data); (void)xfree(credmsg);}
+#define cleanup_credmsg() {(void)krb5_xfree(credmsg->enc_part.ciphertext.data); (void)krb5_xfree(credmsg);}
if (!(scratch = (krb5_data *) malloc(sizeof(*scratch)))) {
cleanup_credmsg();
return ENOMEM;
}
-#define cleanup_scratch() {(void)memset(scratch->data, 0, scratch->length); (void)xfree(scratch->data);}
+#define cleanup_scratch() {(void)memset(scratch->data, 0, scratch->length); (void)krb5_xfree(scratch->data);}
if (retval = encode_krb5_ticket(credmsg->tickets[0], &scratch)) {
cleanup_credmsg();
creds->ticket = *scratch;
if (!(creds->ticket.data = malloc(scratch->length))) {
- xfree(creds->ticket.data);
+ krb5_xfree(creds->ticket.data);
return ENOMEM;
}
memcpy((char *)creds->ticket.data, (char *) scratch->data, scratch->length);
}
cleanup_scratch();
-#define cleanup_mesg() {(void)xfree(credmsg_enc_part);}
+#define cleanup_mesg() {(void)krb5_xfree(credmsg_enc_part);}
if (retval = krb5_timeofday(¤ttime)) {
cleanup_mesg();
/* makedepend won't understand -YPOSIX also implies -DPOSIX... */
/* #define MakeDependFlags -DPOSIX */
-/* #define DefaultCDebugFlags OptimizedCDebugFlags */
+#define DefaultCDebugFlags DebuggableCDebugFlags
/* #undef HasNdbm */
#define HasNdbm YES
#define KRB5_FREE__
/* to keep lint happy */
-#define xfree(val) free((char *)(val))
+#define krb5_xfree(val) free((char *)(val))
-#define krb5_free_data(val) { xfree((val)->data); xfree(val);}
+#define krb5_free_data(val) { krb5_xfree((val)->data); krb5_xfree(val);}
#endif /* KRB5_FREE__ */
PROTOTYPE((krb5_principal ));
void krb5_free_authenticator
PROTOTYPE((krb5_authenticator * ));
+void krb5_free_authenticator_contents
+ PROTOTYPE((krb5_authenticator * ));
void krb5_free_addresses
PROTOTYPE((krb5_address ** ));
void krb5_free_address
memset((char *) entry->key.contents, 0, entry->key.length);
memset((char *) entry->alt_key.contents, 0, entry->alt_key.length);
if (entry->key.contents)
- xfree(entry->key.contents);
+ krb5_xfree(entry->key.contents);
if (entry->alt_key.contents)
- xfree(entry->alt_key.contents);
+ krb5_xfree(entry->alt_key.contents);
return(KRB_ERR_GENERIC);
}
memset((char *) entry->key.contents, 0, entry->key.length);
memset((char *) entry->alt_key.contents, 0, entry->alt_key.length);
if (entry->key.contents)
- xfree(entry->key.contents);
+ krb5_xfree(entry->key.contents);
if (entry->alt_key.contents)
- xfree(entry->alt_key.contents);
+ krb5_xfree(entry->alt_key.contents);
return(5);
}
}
memset((char *) entry->key.contents, 0, entry->key.length);
if (entry->key.contents)
- xfree(entry->key.contents);
+ krb5_xfree(entry->key.contents);
memset((char *) entry->alt_key.contents, 0, entry->alt_key.length);
if (entry->alt_key.contents)
- xfree(entry->alt_key.contents);
+ krb5_xfree(entry->alt_key.contents);
if (retval) {
com_err("adm_modify_kdb", retval,
}
salt.saltdata = *foo;
- xfree(foo);
+ krb5_xfree(foo);
altsalt.salttype = KRB5_KDB_SALTTYPE_V4;
altsalt.saltdata.data = 0;
altsalt.saltdata.length = 0;
com_err("adm_enter_pwd_key", retval,
"while converting password to alt_key for '%s'", newprinc);
memset((char *) new_password, 0, sizeof(new_password)); /* erase it */
- xfree(salt.saltdata.data);
+ krb5_xfree(salt.saltdata.data);
return(retval);
}
&altsalt.saltdata)) {
com_err("adm_enter_pwd_key", retval,
"while converting password to alt_key for '%s'", newprinc);
- xfree(salt.saltdata.data);
+ krb5_xfree(salt.saltdata.data);
free(entry->alt_key.contents);
memset((char *) new_password, 0, sizeof(new_password)); /* erase it */
return(retval);
com_err("adm_enter_rnd_pwd_key", 0, "Unable to Initialize Random Key");
(void) krb5_finish_key(&master_encblock);
memset((char *)master_keyblock.contents, 0, master_keyblock.length);
- xfree(master_keyblock.contents);
+ krb5_xfree(master_keyblock.contents);
goto finish;
}
int krb5_free_keyblock_contents(krb5_keyblock *key)
{
memset(key->contents, 0, key->length);
- xfree(key->contents);
+ krb5_xfree(key->contents);
return 0;
}
OLDDECLARG(krb5_pointer *, seed)
{
memset((char *)*seed, 0, sizeof(mit_des_random_key_seed) );
- xfree(*seed);
+ krb5_xfree(*seed);
*seed = 0;
return 0;
}
libraries */
register krb5_address **addr2;
for (addr2 = addrs; *addr2; addr2++) {
- xfree((*addr2)->contents);
- xfree(*addr2);
+ krb5_xfree((*addr2)->contents);
+ krb5_xfree(*addr2);
}
- xfree(addrs);
+ krb5_xfree(addrs);
}
/*
* Generate a tempory value that depends on the key and host_id
if (!(randkey = (krb5_keyblock *)malloc(sizeof(*randkey))))
return ENOMEM;
if (!(randkey->contents = (krb5_octet *)malloc(sizeof(mit_des_cblock)))) {
- xfree(randkey);
+ krb5_xfree(randkey);
return ENOMEM;
}
randkey->length = sizeof(mit_des_cblock);
/* clean & free the input string */
memset(copystr, 0, length);
- xfree(copystr);
+ krb5_xfree(copystr);
/* now fix up key parity again */
mit_des_fixup_key_parity(key);
return(ENOMEM);
#define cleanup() {memset(keyblock->contents, 0, sizeof(mit_des_cblock));\
- xfree(keyblock->contents);}
+ krb5_xfree(keyblock->contents);}
keyblock->keytype = KEYTYPE_DES;
keyblock->length = sizeof(mit_des_cblock);
context->my_address.length = channel->initiator_address.length;
if (!(context->my_address.contents = (krb5_octet *)
malloc(context->my_address.length))) {
- xfree(context);
+ krb5_xfree(context);
return(GSS_S_FAILURE);
}
memcpy((char *) context->my_address.contents,
context->his_address.length = channel->acceptor_address.length;
if (!(context->his_address.contents = (krb5_octet *)
malloc(context->my_address.length))) {
- xfree(context->my_address.contents);
- xfree(context);
+ krb5_xfree(context->my_address.contents);
+ krb5_xfree(context);
return(GSS_S_FAILURE);
}
memcpy((char *) context->his_address.contents,
if (*minor_status =
krb5_generate_seq_number(authdat->ticket->enc_part2->session,
&context->my_seq_num)) {
- xfree(context->his_address.contents);
- xfree(context->my_address.contents);
- xfree(context);
+ krb5_xfree(context->his_address.contents);
+ krb5_xfree(context->my_address.contents);
+ krb5_xfree(context);
krb5_free_tkt_authent(authdat);
return(GSS_S_FAILURE);
}
krb5_mk_rep(&repl,
authdat->ticket->enc_part2->session,
&outbuf)) {
- xfree(context->his_address.contents);
- xfree(context->my_address.contents);
- xfree(context);
+ krb5_xfree(context->his_address.contents);
+ krb5_xfree(context->my_address.contents);
+ krb5_xfree(context);
krb5_free_tkt_authent(authdat);
return(GSS_S_FAILURE);
}
outbuf.length,
outbuf.data,
output_token)) {
- xfree(context->his_address.contents);
- xfree(context->my_address.contents);
- xfree(context);
- xfree(outbuf.data);
+ krb5_xfree(context->his_address.contents);
+ krb5_xfree(context->my_address.contents);
+ krb5_xfree(context);
+ krb5_xfree(outbuf.data);
krb5_free_tkt_authent(authdat);
return(GSS_S_FAILURE);
}
if (*minor_status =
krb5_copy_principal(verifier_cred_handle.principal,
&context->me)) {
- xfree(context->his_address.contents);
- xfree(context->my_address.contents);
- xfree(context);
+ krb5_xfree(context->his_address.contents);
+ krb5_xfree(context->my_address.contents);
+ krb5_xfree(context);
return(GSS_S_FAILURE);
}
if (*minor_status =
krb5_copy_principal(authdat->authenticator->client,
&context->him)) {
krb5_free_principal(context->me);
- xfree(context->his_address.contents);
- xfree(context->my_address.contents);
- xfree(context);
+ krb5_xfree(context->his_address.contents);
+ krb5_xfree(context->my_address.contents);
+ krb5_xfree(context);
return(GSS_S_FAILURE);
}
if (*minor_status =
&context->session_key)) {
krb5_free_principal(context->me);
krb5_free_principal(context->him);
- xfree(context->his_address.contents);
- xfree(context->my_address.contents);
- xfree(context);
+ krb5_xfree(context->his_address.contents);
+ krb5_xfree(context->my_address.contents);
+ krb5_xfree(context);
return(GSS_S_FAILURE);
}
context->his_seq_num = authdat->authenticator->seq_number;
if (src_name) {
if (*minor_status = krb5_copy_principal(context->him,
src_name)) {
- xfree(context->session_key->contents);
+ krb5_xfree(context->session_key->contents);
krb5_free_principal(context->me);
krb5_free_principal(context->him);
- xfree(context->his_address.contents);
- xfree(context->my_address.contents);
- xfree(context);
+ krb5_xfree(context->his_address.contents);
+ krb5_xfree(context->my_address.contents);
+ krb5_xfree(context);
return(GSS_S_FAILURE);
}
}
context->my_address.length = channel->initiator_address.length;
if (!(context->my_address.contents = (krb5_octet *)
malloc(context->my_address.length))) {
- xfree(context);
+ krb5_xfree(context);
return(GSS_S_FAILURE);
}
memcpy((char *) context->my_address.contents,
context->his_address.length = channel->acceptor_address.length;
if (!(context->his_address.contents = (krb5_octet *)
malloc(context->my_address.length))) {
- xfree(context->my_address.contents);
- xfree(context);
+ krb5_xfree(context->my_address.contents);
+ krb5_xfree(context);
return(GSS_S_FAILURE);
}
memcpy((char *) context->his_address.contents,
if (*minor_status =
krb5_generate_seq_number(&creds.keyblock,
&context->my_seq_num)) {
- xfree(context->his_address.contents);
- xfree(context->my_address.contents);
+ krb5_xfree(context->his_address.contents);
+ krb5_xfree(context->my_address.contents);
free((char *)context);
return(GSS_S_FAILURE);
}
if (*minor_status =
krb5_copy_keyblock(&creds.keyblock,
&context->session_key)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
krb5_free_cred_contents(&creds);
free((char *)context);
return(GSS_S_FAILURE);
outbuf.length,
outbuf.data,
output_token)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
krb5_free_cred_contents(&creds);
free((char *) context);
return(GSS_S_FAILURE);
* Send over the requested flags information
*/
((char *) output_token->value)[4] = context->flags;
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
*context_handle = context;
context->state = GSS_KRB_STATE_DOWN;
*ret_flags = context->flags;
krb5_free_principal(cred_handle->principal);
if (*minor_status = krb5_cc_close(cred_handle->ccache))
return(GSS_S_FAILURE);
- xfree(cred_handle->srvtab.contents);
+ krb5_xfree(cred_handle->srvtab.contents);
return(GSS_S_COMPLETE);
}
outbuf.length,
outbuf.data,
output_message_buffer)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
return(GSS_S_FAILURE);
}
if (conf_state)
outbuf.length,
outbuf.data,
output_message_buffer)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
return(GSS_S_FAILURE);
}
if (conf_state)
if (*minor_status = decode_krb5_safe(&outbuf, &message))
return(GSS_S_FAILURE);
message->user_data.length = 1;
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
if (*minor_status = encode_krb5_safe(&message, &scratch)) {
krb5_free_safe(message);
return(GSS_S_FAILURE);
if (*minor_status = decode_krb5_safe(&inbuf, &message))
return(GSS_S_FAILURE);
if (message->user_data.data)
- xfree(message->user_data.data);
+ krb5_xfree(message->user_data.data);
message->user_data.length = message_buffer->length;
message->user_data.data = message_buffer->value;
if (*minor_status = encode_krb5_safe(&message, &scratch)) {
if (retval = krb5_decrypt((krb5_pointer) ((char *) in->contents + 4),
(krb5_pointer) out->contents,
in->length-sizeof(in->length), eblock, 0)) {
- xfree(out->contents);
+ krb5_xfree(out->contents);
out->contents = 0;
out->length = 0;
return retval;
}
if (out->length < 0) {
- xfree(out->contents);
+ krb5_xfree(out->contents);
out->contents = 0;
out->length = 0;
return KRB5_KDB_INVALIDKEYSIZE;
out->length += sizeof(out->length);
out->contents = (krb5_octet *)malloc(out->length);
if (!out->contents) {
- xfree(tmpin.contents);
+ krb5_xfree(tmpin.contents);
out->contents = 0;
out->length = 0;
return ENOMEM;
retval = krb5_encrypt((krb5_pointer) tmpin.contents,
(krb5_pointer) ((char *) out->contents + 4),
tmpin.length, eblock, 0);
- xfree(tmpin.contents);
+ krb5_xfree(tmpin.contents);
if (retval) {
- xfree(out->contents);
+ krb5_xfree(out->contents);
out->contents = 0;
out->length = 0;
}
retval = krb5_string_to_key(eblock, key->keytype, key, &pwd,
salt ? salt : &scratch);
if (!salt)
- xfree(scratch.data);
+ krb5_xfree(scratch.data);
memset(password, 0, sizeof(password)); /* erase it */
return retval;
/* erase the key */
if (entry->key.contents) {
memset((char *)entry->key.contents, 0, entry->key.length);
- xfree(entry->key.contents);
+ krb5_xfree(entry->key.contents);
}
if (entry->salt)
- xfree(entry->salt);
+ krb5_xfree(entry->salt);
if (entry->alt_key.contents) {
memset((char *)entry->alt_key.contents, 0, entry->alt_key.length);
- xfree(entry->alt_key.contents);
+ krb5_xfree(entry->alt_key.contents);
}
if (entry->alt_salt)
- xfree(entry->alt_salt);
+ krb5_xfree(entry->alt_salt);
if (entry->principal)
krb5_free_principal(entry->principal);
retval = krb5_finish_key(eblock);
memset((char *)tempkey.contents, 0, tempkey.length);
- xfree(tempkey.contents);
+ krb5_xfree(tempkey.contents);
krb5_db_free_principal(&master_entry, nprinc);
return retval;
0, /* ignore ivec */
&out5);
krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
krb5_free_address(saddr2);
if (r) {
EPRINT "Return to long (%d > %d)\n",
outbuf.length, MAX_KTXT_LEN);
#endif
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
return(KFAILURE);
}
authent->length = outbuf.length;
memcpy((char *)authent->dat, (char *)outbuf.data, outbuf.length);
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
}
return(krb425error(r));
}
rcache,
&out5);
krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
krb5_free_address(saddr2);
if (r) {
r = krb5_rd_priv(&inbuf, &keyb, saddr2, &raddr,
0, 0, 0, rcache, &out);
krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
krb5_free_address(saddr2);
r = krb5_rd_safe(&inbuf, &keyb, saddr2, &raddr,
0, 0, rcache, &out);
krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
krb5_free_address(saddr2);
{
if (cvt) {
if (_krb425_servkey.contents)
- xfree(_krb425_servkey.contents);
+ krb5_xfree(_krb425_servkey.contents);
mit_des_string_to_key(KEYTYPE_DES, &_krb425_servkey, 0, 0);
} else {
if (!_krb425_servkey.contents &&
}
for (i = 0; i < val->nelem; i++) {
if (qb_pullup(val->element_KRB5_2[i]->ad__data) != OK) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
retval[i] = (krb5_authdata *) xmalloc(sizeof(*retval[i]));
}
retval[i]->contents = (unsigned char *)xmalloc(val->element_KRB5_2[i]->ad__data->qb_forw->qb_len);
if (!retval[i]->contents) {
- xfree(retval[i]);
+ krb5_xfree(retval[i]);
retval[i] = 0;
krb5_free_authdata(retval);
goto nomem;
}
for (i = 0, rv = val; rv; rv = rv->next, i++) {
if (qb_pullup(rv->element_KRB5_2->ad__data) != OK) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
retval[i] = (krb5_authdata *) xmalloc(sizeof(*retval[i]));
}
retval[i]->contents = (unsigned char *)xmalloc(rv->element_KRB5_2->ad__data->qb_forw->qb_len);
if (!retval[i]->contents) {
- xfree(retval[i]);
+ krb5_xfree(retval[i]);
retval[i] = 0;
krb5_free_authdata(retval);
goto nomem;
}
for (i = 0; i < val->nelem; i++) {
if (qb_pullup(val->element_KRB5_0[i]->address) != OK) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
retval[i] = (krb5_address *) xmalloc(sizeof(*retval[i]));
}
retval[i]->contents = (unsigned char *)xmalloc(val->element_KRB5_0[i]->address->qb_forw->qb_len);
if (!retval[i]->contents) {
- xfree(retval[i]);
+ krb5_xfree(retval[i]);
retval[i] = 0;
krb5_free_addresses(retval);
goto nomem;
}
for (i = 0, rv = val; rv; rv = rv->next, i++) {
if (qb_pullup(rv->element_KRB5_0->address) != OK) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
retval[i] = (krb5_address *) xmalloc(sizeof(*retval[i]));
}
retval[i]->contents = (unsigned char *)xmalloc(rv->element_KRB5_0->address->qb_forw->qb_len);
if (!retval[i]->contents) {
- xfree(retval[i]);
+ krb5_xfree(retval[i]);
retval[i] = 0;
krb5_free_addresses(retval);
goto nomem;
xbzero(retval, sizeof(*retval));
if (qb_pullup(val->address) != OK) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
retval->contents = (unsigned char *)xmalloc(val->address->qb_forw->qb_len);
if (!retval->contents) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
retval->addrtype = val->addr__type;
temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
if (temp) {
retval->enc_part = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
return(retval);
temp = KRB5_EncryptedData2krb5_enc_data(val->authenticator, error);
if (temp) {
retval->authenticator = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
krb5_free_ap_req(retval);
return(0);
retval->ctime = gentime2unix(val->ctime, error);
if (*error) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
retval->cusec = val->cusec;
val->crealm,
error);
if (!retval->client) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
if (val->cksum) {
}
retval->contents = (unsigned char *)xmalloc(val->checksum->qb_forw->qb_len);
if (!retval->contents) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
retval->checksum_type = val->cksumtype;
retval->tickets = (krb5_ticket **) xcalloc(i + 1, sizeof(*retval->tickets));
if (!retval->tickets) {
*error = ENOMEM;
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
if (!retval->tickets[i]) {
krb5_free_tickets(retval->tickets);
*error = ENOMEM;
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
xbzero((char *)retval->tickets[i], sizeof(*retval->tickets[i]));
retval->tickets[i] = KRB5_Ticket2krb5_ticket(rv->Ticket, error);
if (!retval->tickets[i]) {
krb5_free_tickets(retval->tickets);
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
}
temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
if (temp) {
retval->enc_part = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
krb5_free_tickets(retval->tickets);
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
temp = qbuf2krb5_data(val->cipher, error);
if (temp) {
retval->ciphertext = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
if (val->optionals & opt_KRB5_EncryptedData_kvno)
retval->session = KRB5_EncryptionKey2krb5_keyblock(val->key, error);
if (!retval->session) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
}
retval->contents = (unsigned char *) xmalloc(val->keyvalue->qb_forw->qb_len);
if (!retval->contents) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
retval->keytype = val->keytype;
alldatout:
free((*data_out)->data);
datout:
- xfree(*data_out);
+ krb5_xfree(*data_out);
*data_out = 0;
peout:
pe_free(pe);
temp = qbuf2krb5_data(val->e__text, error);
if (temp) {
retval->text = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
goto errout;
}
temp = qbuf2krb5_data(val->e__text, error);
if (temp) {
retval->text = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
goto errout;
}
retval->flags = KRB5_TicketFlags2krb5_flags(val->flags, error);
if (*error) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
temp = KRB5_TransitedEncoding2krb5_transited(val->transited, error);
if (temp) {
retval->transited = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
goto errout;
}
(val[i])->length, 1);
if (!retval->element_KRB5_2[i]->ad__data) {
/* clean up */
- xfree(retval->element_KRB5_2[i]);
+ krb5_xfree(retval->element_KRB5_2[i]);
goto errout;
}
}
(val[i])->length, 1);
if (!retval->element_KRB5_0[i]->address) {
/* clean up */
- xfree(retval->element_KRB5_0[i]);
+ krb5_xfree(retval->element_KRB5_0[i]);
goto errout;
}
}
(val[i])->length, 1);
if (!rv2->element_KRB5_0->address) {
/* clean up */
- xfree(rv2->element_KRB5_0);
+ krb5_xfree(rv2->element_KRB5_0);
goto errout;
}
}
retval->addr__type = val->addrtype;
retval->address = str2qb((char *)val->contents, val->length, 1);
if (!retval->address) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
return(retval);
retval->enc__part = krb5_enc_data2KRB5_EncryptedData(&(val->enc_part),
error);
if (!retval->enc__part) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
return(retval);
retval->ap__options = krb5_apoptions2KRB5_APOptions(val->ap_options,
error);
if (!retval->ap__options) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
retval->ticket = krb5_ticket2KRB5_Ticket(val->ticket, error);
retval->ctime = unix2gentime(val->ctime, error);
if (!retval->ctime) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
rv2->Ticket = krb5_ticket2KRB5_Ticket(val->tickets[i], error);
if (!rv2->Ticket) {
- xfree(retval->tickets);
+ krb5_xfree(retval->tickets);
return(0);
}
}
if (!retval->tickets) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
retval->enc__part = krb5_enc_data2KRB5_EncryptedData(&(val->enc_part),
error);
if (!retval->enc__part) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
return(retval);
}
for (i = 0, rv = val; rv; rv = rv->next, i++) {
if (qb_pullup(rv->PA__DATA->pa__data) != OK) {
- xfree(retval);
+ krb5_xfree(retval);
*error = ENOMEM;
return(0);
}
if (retval[i]->length) {
retval[i]->contents = (unsigned char *)xmalloc(rv->PA__DATA->pa__data->qb_forw->qb_len);
if (!retval[i]->contents) {
- xfree(retval[i]);
+ krb5_xfree(retval[i]);
retval[i] = 0;
krb5_free_pa_data(retval);
*error = ENOMEM;
if (val->padata) {
retval->padata = element_KRB5_112krb5_pa_data(val->padata, error);
if (*error) {
- xfree(retval);
+ krb5_xfree(retval);
return 0;
}
val->crealm,
error);
if (!retval->client) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
if (temp) {
retval->enc_part = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
krb5_free_kdc_rep(retval);
return(0);
retval->etype = val->etype;
retval->cipher = krb5_data2qbuf(&(val->ciphertext));
if (!retval->cipher) {
- xfree(retval);
+ krb5_xfree(retval);
*error = ENOMEM;
return(0);
}
retval->key = krb5_keyblock2KRB5_EncryptionKey(val->session, error);
if (!retval->key) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
retval->last__req = krb5_last_req2KRB5_LastReq(val->last_req, error);
if (val->ctime) {
retval->ctime = unix2gentime(val->ctime, error);
if (!retval->ctime) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
}
retval->flags = krb5_flags2KRB5_TicketFlags(val->flags, error);
if (*error) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
retval->key = krb5_keyblock2KRB5_EncryptionKey(val->session, error);
retval->user__data = krb5_data2qbuf(&(val->user_data));
if (!retval->user__data) {
- xfree(retval);
+ krb5_xfree(retval);
*error = ENOMEM;
return(0);
}
retval->enc__part = krb5_enc_data2KRB5_EncryptedData(&(val->enc_part),
error);
if (!retval->enc__part) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
return(retval);
free_KRB5_PasswdSequence(rv1->PasswdSequence);
rv2 = rv1->next;
- xfree(rv1);
+ krb5_xfree(rv1);
}
goto errout;
}
rv2 = (struct type_KRB5_KRB__SAFE__BODY *)xmalloc(sizeof(*rv2));
if (!rv2) {
- xfree(retval);
+ krb5_xfree(retval);
*error = ENOMEM;
return(0);
}
rv2->user__data = krb5_data2qbuf(&(val->user_data));
if (!rv2->user__data) {
- xfree(retval);
+ krb5_xfree(retval);
*error = ENOMEM;
return(0);
}
free_KRB5_Ticket(adtk->Ticket[i]);
i--;
}
- xfree(adtk);
+ krb5_xfree(adtk);
goto errout;
}
}
if (rv1->Ticket)
free_KRB5_Ticket(rv1->Ticket);
rv2 = rv1->next;
- xfree(rv1);
+ krb5_xfree(rv1);
}
goto errout;
}
if (val->padata) {
retval->padata = krb5_pa_data2element_KRB5_7(val->padata, error);
if (*error) {
- xfree(retval);
+ krb5_xfree(retval);
return 0;
}
}
temp = qbuf2krb5_data(val->user__data, error);
if (temp) {
retval->user_data = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
if (val->timestamp) {
retval->length = i;
retval->data = (krb5_data *)malloc(i * sizeof(krb5_data));
if (retval->data == 0) {
- xfree(retval);
+ krb5_xfree(retval);
*error = ENOMEM;
return 0;
}
retval->type = val->name__type;
if (qbuf_to_data(realm, krb5_princ_realm(retval))) {
- xfree(retval->data);
- xfree(retval);
+ krb5_xfree(retval->data);
+ krb5_xfree(retval);
*error = ENOMEM;
return 0;
}
temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
if (temp) {
retval->enc_part = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
return(retval);
retval->passwd = qbuf2krb5_data(val->passwd, error);
if (!retval->passwd) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
retval->phrase = qbuf2krb5_data(val->phrase, error);
if (!retval->phrase) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
krb5_free_pwd_sequences(element[i]);
i--;
}
- xfree(element);
+ krb5_xfree(element);
goto errout;
}
}
}
retval->data = (char *)xmalloc(val->qb_forw->qb_len);
if (!retval->data) {
- xfree(retval);
+ krb5_xfree(retval);
goto nomem;
}
xbcopy(val->qb_forw->qb_data, retval->data,
temp = qbuf2krb5_data(val->safe__body->user__data, error);
if (temp) {
retval->user_data = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
if (val->safe__body->timestamp) {
error);
if (temp) {
retval->authorization_data = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else
goto errout;
}
krb5_free_ticket(aticks[i]);
i--;
}
- xfree(aticks);
+ krb5_xfree(aticks);
goto errout;
}
}
krb5_free_ticket(aticks[i]);
i--;
}
- xfree(aticks);
+ krb5_xfree(aticks);
goto errout;
}
}
}
for (i = 0, rv = val; rv; rv = rv->next, i++) {
if (qb_pullup(rv->PA__DATA->pa__data) != OK) {
- xfree(retval);
+ krb5_xfree(retval);
*error = ENOMEM;
return(0);
}
if (retval[i]->length) {
retval[i]->contents = (unsigned char *)xmalloc(rv->PA__DATA->pa__data->qb_forw->qb_len);
if (!retval[i]->contents) {
- xfree(retval[i]);
+ krb5_xfree(retval[i]);
retval[i] = 0;
krb5_free_pa_data(retval);
*error = ENOMEM;
val->realm,
error);
if (!retval->server) {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
if (temp) {
retval->enc_part = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
krb5_free_ticket(retval);
return(0);
temp = qbuf2krb5_data(val->contents, error);
if (temp) {
retval->tr_contents = *temp;
- xfree(temp);
+ krb5_xfree(temp);
} else {
- xfree(retval);
+ krb5_xfree(retval);
return(0);
}
return(retval);
if (((krb5_fcc_data *) id->data)->fd >= 0)
krb5_fcc_close_file(id);
- xfree(((krb5_fcc_data *) id->data)->filename);
- xfree(((krb5_fcc_data *) id->data));
- xfree(id);
+ krb5_xfree(((krb5_fcc_data *) id->data)->filename);
+ krb5_xfree(((krb5_fcc_data *) id->data));
+ krb5_xfree(id);
return closeval;
}
and if not, fcc_start_seq_get and/or fcc_next_cred will do the
MAYBE_CLOSE.
MAYBE_CLOSE(id, kret); */
- xfree((krb5_fcc_cursor *) *cursor);
+ krb5_xfree((krb5_fcc_cursor *) *cursor);
return kret;
}
lid->data = (krb5_pointer) malloc(sizeof(krb5_fcc_data));
if (lid->data == NULL) {
- xfree(lid);
+ krb5_xfree(lid);
return KRB5_CC_NOMEM;
}
((krb5_fcc_data *) lid->data)->filename = (char *)
malloc(strlen(scratch) + 1);
if (((krb5_fcc_data *) lid->data)->filename == NULL) {
- xfree(((krb5_fcc_data *) lid->data));
- xfree(lid);
+ krb5_xfree(((krb5_fcc_data *) lid->data));
+ krb5_xfree(lid);
return KRB5_CC_NOMEM;
}
}
err_out:
- xfree(((krb5_fcc_data *) lid->data)->filename);
- xfree(((krb5_fcc_data *) lid->data));
- xfree(lid);
+ krb5_xfree(((krb5_fcc_data *) lid->data)->filename);
+ krb5_xfree(((krb5_fcc_data *) lid->data));
+ krb5_xfree(lid);
return retcode;
}
(keyblock->length)*sizeof(krb5_octet));
if (ret < 0) {
- xfree(keyblock->contents);
+ krb5_xfree(keyblock->contents);
return krb5_fcc_interpret(errno);
}
if (ret != (keyblock->length)*sizeof(krb5_octet)) {
- xfree(keyblock->contents);
+ krb5_xfree(keyblock->contents);
return KRB5_CC_END;
}
return KRB5_OK;
errout:
if (keyblock->contents)
- xfree(keyblock->contents);
+ krb5_xfree(keyblock->contents);
return kret;
}
ret = read(((krb5_fcc_data *) id->data)->fd, (char *)data->data,
data->length);
if (ret == -1) {
- xfree(data->data);
+ krb5_xfree(data->data);
return krb5_fcc_interpret(errno);
}
if (ret != data->length) {
- xfree(data->data);
+ krb5_xfree(data->data);
return KRB5_CC_END;
}
data->data[data->length] = 0; /* Null terminate, just in case.... */
return KRB5_OK;
errout:
if (data->data)
- xfree(data->data);
+ krb5_xfree(data->data);
return kret;
}
ret = read(((krb5_fcc_data *) id->data)->fd, (char *)addr->contents,
(addr->length)*sizeof(krb5_octet));
if (ret == -1) {
- xfree(addr->contents);
+ krb5_xfree(addr->contents);
return krb5_fcc_interpret(errno);
}
if (ret != (addr->length)*sizeof(krb5_octet)) {
- xfree(addr->contents);
+ krb5_xfree(addr->contents);
return KRB5_CC_END;
}
return KRB5_OK;
errout:
if (addr->contents)
- xfree(addr->contents);
+ krb5_xfree(addr->contents);
return kret;
}
ret = read(((krb5_fcc_data *) id->data)->fd, (char *)a->contents,
(a->length)*sizeof(krb5_octet));
if (ret == -1) {
- xfree(a->contents);
+ krb5_xfree(a->contents);
return krb5_fcc_interpret(errno);
}
if (ret != (a->length)*sizeof(krb5_octet)) {
- xfree(a->contents);
+ krb5_xfree(a->contents);
return KRB5_CC_END;
}
return KRB5_OK;
errout:
if (a->contents)
- xfree(a->contents);
+ krb5_xfree(a->contents);
return kret;
}
lid->data = (krb5_pointer) malloc(sizeof(krb5_fcc_data));
if (lid->data == NULL) {
- xfree(lid);
+ krb5_xfree(lid);
return KRB5_CC_NOMEM;
}
malloc(strlen(residual) + 1);
if (((krb5_fcc_data *) lid->data)->filename == NULL) {
- xfree(((krb5_fcc_data *) lid->data));
- xfree(lid);
+ krb5_xfree(((krb5_fcc_data *) lid->data));
+ krb5_xfree(lid);
return KRB5_CC_NOMEM;
}
if (OPENCLOSE(id)) {
ret = krb5_fcc_open_file(id, FCC_OPEN_RDONLY);
if (ret) {
- xfree(fcursor);
+ krb5_xfree(fcursor);
return ret;
}
}
closeval = KRB5_OK;
}
- xfree (data->filename);
- xfree (data);
- xfree (id);
+ krb5_xfree (data->filename);
+ krb5_xfree (data);
+ krb5_xfree (id);
return closeval;
}
int ret = KRB5_OK;
/* MAYBE_CLOSE (id, ret);*/
- xfree((krb5_scc_cursor *) *cursor);
+ krb5_xfree((krb5_scc_cursor *) *cursor);
return ret;
}
lid->data = (krb5_pointer) malloc(sizeof(krb5_scc_data));
if (lid->data == NULL) {
- xfree(lid);
+ krb5_xfree(lid);
return KRB5_CC_NOMEM;
}
((krb5_scc_data *) lid->data)->filename = (char *)
malloc(strlen(scratch) + 1);
if (((krb5_scc_data *) lid->data)->filename == NULL) {
- xfree(((krb5_scc_data *) lid->data));
- xfree(lid);
+ krb5_xfree(((krb5_scc_data *) lid->data));
+ krb5_xfree(lid);
return KRB5_CC_NOMEM;
}
return KRB5_OK;
}
err_out:
- xfree(((krb5_scc_data *) lid->data)->filename);
- xfree(((krb5_scc_data *) lid->data));
- xfree(lid);
+ krb5_xfree(((krb5_scc_data *) lid->data)->filename);
+ krb5_xfree(((krb5_scc_data *) lid->data));
+ krb5_xfree(lid);
return retcode;
}
((krb5_scc_data *) id->data)->file);
if ((ret == 0) && errno) {
- xfree(keyblock->contents);
+ krb5_xfree(keyblock->contents);
return krb5_scc_interpret(errno);
}
if (ret != (keyblock->length)*sizeof(krb5_octet)) {
- xfree(keyblock->contents);
+ krb5_xfree(keyblock->contents);
return KRB5_CC_END;
}
return KRB5_OK;
errout:
if (keyblock->contents)
- xfree(keyblock->contents);
+ krb5_xfree(keyblock->contents);
return kret;
}
ret = fread((char *)data->data, 1,
data->length, ((krb5_scc_data *) id->data)->file);
if ((ret == 0) && errno) {
- xfree(data->data);
+ krb5_xfree(data->data);
return krb5_scc_interpret(errno);
}
if (ret != data->length) {
- xfree(data->data);
+ krb5_xfree(data->data);
return KRB5_CC_END;
}
data->data[data->length] = 0; /* Null terminate just in case.... */
return KRB5_OK;
errout:
if (data->data)
- xfree(data->data);
+ krb5_xfree(data->data);
return kret;
}
ret = fread((char *)addr->contents, 1, (addr->length)*sizeof(krb5_octet),
((krb5_scc_data *) id->data)->file);
if ((ret == 0) && errno) {
- xfree(addr->contents);
+ krb5_xfree(addr->contents);
return krb5_scc_interpret(errno);
}
if (ret != (addr->length)*sizeof(krb5_octet)) {
- xfree(addr->contents);
+ krb5_xfree(addr->contents);
return KRB5_CC_END;
}
return KRB5_OK;
errout:
if (addr->contents)
- xfree(addr->contents);
+ krb5_xfree(addr->contents);
return kret;
}
(a->length)*sizeof(krb5_octet),
((krb5_scc_data *) id->data)->file);
if ((ret == 0) && errno) {
- xfree(a->contents);
+ krb5_xfree(a->contents);
return krb5_scc_interpret(errno);
}
if (ret != (a->length)*sizeof(krb5_octet)) {
- xfree(a->contents);
+ krb5_xfree(a->contents);
return KRB5_CC_END;
}
return KRB5_OK;
errout:
if (a->contents)
- xfree(a->contents);
+ krb5_xfree(a->contents);
return kret;
}
lid->data = (krb5_pointer) malloc(sizeof(krb5_scc_data));
if (lid->data == NULL) {
- xfree(lid);
+ krb5_xfree(lid);
return KRB5_CC_NOMEM;
}
malloc(strlen(residual) + 1);
if (((krb5_scc_data *) lid->data)->filename == NULL) {
- xfree(((krb5_scc_data *) lid->data));
- xfree(lid);
+ krb5_xfree(((krb5_scc_data *) lid->data));
+ krb5_xfree(lid);
return KRB5_CC_NOMEM;
}
krb5_address *val;
{
if (val->contents)
- xfree(val->contents);
- xfree(val);
+ krb5_xfree(val->contents);
+ krb5_xfree(val);
return;
}
for (temp = val; *temp; temp++) {
if ((*temp)->contents)
- xfree((*temp)->contents);
- xfree(*temp);
+ krb5_xfree((*temp)->contents);
+ krb5_xfree(*temp);
}
- xfree(val);
+ krb5_xfree(val);
return;
}
register krb5_ap_rep *val;
{
if (val->enc_part.ciphertext.data)
- xfree(val->enc_part.ciphertext.data);
- xfree(val);
+ krb5_xfree(val->enc_part.ciphertext.data);
+ krb5_xfree(val);
return;
}
if (val->ticket)
krb5_free_ticket(val->ticket);
if (val->authenticator.ciphertext.data)
- xfree(val->authenticator.ciphertext.data);
- xfree(val);
+ krb5_xfree(val->authenticator.ciphertext.data);
+ krb5_xfree(val);
return;
}
{
if (val->subkey)
krb5_free_keyblock(val->subkey);
- xfree(val);
+ krb5_xfree(val);
return;
}
for (temp = val; *temp; temp++) {
if ((*temp)->contents)
- xfree((*temp)->contents);
- xfree(*temp);
+ krb5_xfree((*temp)->contents);
+ krb5_xfree(*temp);
}
- xfree(val);
+ krb5_xfree(val);
return;
}
krb5_free_keyblock(val->subkey);
if (val->authorization_data)
krb5_free_authdata(val->authorization_data);
- xfree(val);
+ krb5_xfree(val);
return;
}
register krb5_checksum *val;
{
if (val->contents)
- xfree(val->contents);
- xfree(val);
+ krb5_xfree(val->contents);
+ krb5_xfree(val);
return;
}
if (val->tickets)
krb5_free_tickets(val->tickets);
if (val->enc_part.ciphertext.data)
- xfree(val->enc_part.ciphertext.data);
- xfree(val);
+ krb5_xfree(val->enc_part.ciphertext.data);
+ krb5_xfree(val);
return;
}
krb5_free_principal(val->server);
if (val->keyblock.contents) {
memset((char *)val->keyblock.contents, 0, val->keyblock.length);
- xfree(val->keyblock.contents);
+ krb5_xfree(val->keyblock.contents);
}
if (val->ticket.data)
- xfree(val->ticket.data);
+ krb5_xfree(val->ticket.data);
if (val->second_ticket.data)
- xfree(val->second_ticket.data);
+ krb5_xfree(val->second_ticket.data);
if (val->addresses)
krb5_free_addresses(val->addresses);
if (val->authdata)
krb5_free_principal((*temp)->server);
if ((*temp)->caddrs)
krb5_free_addresses((*temp)->caddrs);
- xfree((*temp));
+ krb5_xfree((*temp));
}
- xfree(val);
+ krb5_xfree(val);
return;
}
krb5_creds *val;
{
krb5_free_cred_contents(val);
- xfree(val);
+ krb5_xfree(val);
return;
}
krb5_free_principal(val->server);
if (val->caddrs)
krb5_free_addresses(val->caddrs);
- xfree(val);
+ krb5_xfree(val);
return;
}
if (val->client)
krb5_free_principal(val->client);
if (val->transited.tr_contents.data)
- xfree(val->transited.tr_contents.data);
+ krb5_xfree(val->transited.tr_contents.data);
if (val->caddrs)
krb5_free_addresses(val->caddrs);
if (val->authorization_data)
krb5_free_authdata(val->authorization_data);
- xfree(val);
+ krb5_xfree(val);
return;
}
if (val->server)
krb5_free_principal(val->server);
if (val->text.data)
- xfree(val->text.data);
+ krb5_xfree(val->text.data);
if (val->e_data.data)
- xfree(val->e_data.data);
- xfree(val);
+ krb5_xfree(val->e_data.data);
+ krb5_xfree(val);
return;
}
if (val->ticket)
krb5_free_ticket(val->ticket);
if (val->enc_part.ciphertext.data)
- xfree(val->enc_part.ciphertext.data);
+ krb5_xfree(val->enc_part.ciphertext.data);
if (val->enc_part2)
krb5_free_enc_kdc_rep_part(val->enc_part2);
- xfree(val);
+ krb5_xfree(val);
return;
}
if (val->server)
krb5_free_principal(val->server);
if (val->etype)
- xfree(val->etype);
+ krb5_xfree(val->etype);
if (val->addresses)
krb5_free_addresses(val->addresses);
if (val->authorization_data.ciphertext.data)
- xfree(val->authorization_data.ciphertext.data);
+ krb5_xfree(val->authorization_data.ciphertext.data);
if (val->unenc_authdata)
krb5_free_authdata(val->unenc_authdata);
if (val->second_ticket)
krb5_free_tickets(val->second_ticket);
- xfree(val);
+ krb5_xfree(val);
return;
}
{
if (val->contents) {
memset((char *)val->contents, 0, val->length);
- xfree(val->contents);
+ krb5_xfree(val->contents);
}
- xfree(val);
+ krb5_xfree(val);
return;
}
register krb5_last_req_entry **temp;
for (temp = val; *temp; temp++)
- xfree(*temp);
- xfree(val);
+ krb5_xfree(*temp);
+ krb5_xfree(val);
return;
}
for (temp = val; *temp; temp++) {
if ((*temp)->contents)
- xfree((*temp)->contents);
- xfree(*temp);
+ krb5_xfree((*temp)->contents);
+ krb5_xfree(*temp);
}
- xfree(val);
+ krb5_xfree(val);
return;
}
if (val->data) {
while(--i >= 0)
free(krb5_princ_component(val, i)->data);
- xfree(val->data);
+ krb5_xfree(val->data);
}
if (val->realm.data)
- xfree(val->realm.data);
- xfree(val);
+ krb5_xfree(val->realm.data);
+ krb5_xfree(val);
return;
}
register krb5_priv *val;
{
if (val->enc_part.ciphertext.data)
- xfree(val->enc_part.ciphertext.data);
- xfree(val);
+ krb5_xfree(val->enc_part.ciphertext.data);
+ krb5_xfree(val);
return;
}
register krb5_priv_enc_part *val;
{
if (val->user_data.data)
- xfree(val->user_data.data);
+ krb5_xfree(val->user_data.data);
if (val->r_address)
krb5_free_address(val->r_address);
if (val->s_address)
krb5_free_address(val->s_address);
- xfree(val);
+ krb5_xfree(val);
return;
}
{
if (val->element)
krb5_free_pwd_sequences(val->element);
- xfree(val);
+ krb5_xfree(val);
return;
}
passwd_phrase_element **val;
{
if ((*val)->passwd)
- xfree((*val)->passwd);
+ krb5_xfree((*val)->passwd);
if ((*val)->phrase)
- xfree((*val)->phrase);
+ krb5_xfree((*val)->phrase);
return;
}
register krb5_safe *val;
{
if (val->user_data.data)
- xfree(val->user_data.data);
+ krb5_xfree(val->user_data.data);
if (val->r_address)
krb5_free_address(val->r_address);
if (val->s_address)
krb5_free_address(val->s_address);
if (val->checksum)
krb5_free_checksum(val->checksum);
- xfree(val);
+ krb5_xfree(val);
return;
}
register krb5_creds **tgtpp;
for (tgtpp = tgts; *tgtpp; tgtpp++)
krb5_free_creds(*tgtpp);
- xfree(tgts);
+ krb5_xfree(tgts);
}
if (val->server)
krb5_free_principal(val->server);
if (val->enc_part.ciphertext.data)
- xfree(val->enc_part.ciphertext.data);
+ krb5_xfree(val->enc_part.ciphertext.data);
if (val->enc_part2)
krb5_free_enc_tkt_part(val->enc_part2);
- xfree(val);
+ krb5_xfree(val);
return;
}
for (temp = val; *temp; temp++)
krb5_free_ticket(*temp);
- xfree(val);
+ krb5_xfree(val);
return;
}
krb5_free_ticket(val->ticket);
if (val->authenticator)
krb5_free_authenticator(val->authenticator);
- xfree(val);
+ krb5_xfree(val);
return;
}
* This routine should undo anything done by krb5_ktfile_resolve().
*/
{
- xfree(KTFILENAME(id));
- xfree(id->data);
+ krb5_xfree(KTFILENAME(id));
+ krb5_xfree(id->data);
id->ops = 0;
- xfree(id);
+ krb5_xfree(id);
return (0);
}
krb5_keytab id;
krb5_kt_cursor *cursor;
{
- xfree(*cursor);
+ krb5_xfree(*cursor);
return krb5_ktfileint_close(id);
}
if (!(kerror = krb5_ktfileint_close(id))) {
if (cur_entry) {
*entry = *cur_entry;
- xfree(cur_entry);
+ krb5_xfree(cur_entry);
} else
kerror = KRB5_KT_NOTFOUND;
} else
return kerror;
*fileoff = ftell(KTFILEP(id));
*entry = *cur_entry;
- xfree(cur_entry);
+ krb5_xfree(cur_entry);
return 0;
}
(*id)->ops = &krb5_ktf_ops;
if ((data = (krb5_ktfile_data *)malloc(sizeof(krb5_ktfile_data))) == NULL) {
- xfree(*id);
+ krb5_xfree(*id);
return(ENOMEM);
}
if ((data->name = (char *)calloc(strlen(name) + 1, sizeof(char))) == NULL) {
- xfree(data);
- xfree(*id);
+ krb5_xfree(data);
+ krb5_xfree(*id);
return(ENOMEM);
}
(*id)->ops = &krb5_ktf_writable_ops;
if ((data = (krb5_ktfile_data *)malloc(sizeof(krb5_ktfile_data))) == NULL) {
- xfree(*id);
+ krb5_xfree(*id);
return(ENOMEM);
}
if ((data->name = (char *)calloc(strlen(name) + 1, sizeof(char))) == NULL) {
- xfree(data);
- xfree(*id);
+ krb5_xfree(data);
+ krb5_xfree(*id);
return(ENOMEM);
}
{
krb5_free_principal(entry->principal);
memset((char *)entry->key.contents, 0, entry->key.length);
- xfree(entry->key.contents);
+ krb5_xfree(entry->key.contents);
return 0;
}
return ENOMEM;
princ_ret = (krb5_principal) malloc(sizeof(krb5_principal_data));
if (!princ_ret) {
- xfree(princ_data);
+ krb5_xfree(princ_data);
return ENOMEM;
}
princ_ret->data = princ_data;
princ_ret->length = count;
tmpdata = malloc(rlen+1);
if (!tmpdata) {
- xfree(princ_data);
- xfree(princ_ret);
+ krb5_xfree(princ_data);
+ krb5_xfree(princ_ret);
return ENOMEM;
}
krb5_princ_set_realm_length(princ_ret, rlen);
free_out:
while (i-- >= 0)
- xfree(princ_data[i].data);
- xfree(princ_data);
- xfree(princ_ret);
+ krb5_xfree(princ_data[i].data);
+ krb5_xfree(princ_data);
+ krb5_xfree(princ_ret);
va_end(ap);
return ENOMEM;
}
if (!p_tmp) {
free_out:
while (--i >= 0)
- xfree(data[i].data);
- xfree(data);
- xfree(tmpdata);
+ krb5_xfree(data[i].data);
+ krb5_xfree(data);
+ krb5_xfree(tmpdata);
return (ENOMEM);
}
count *= 2;
return ENOMEM;
*tmpad = *inad;
if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
- xfree(tmpad);
+ krb5_xfree(tmpad);
return ENOMEM;
}
memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
retval = krb5_copy_principal(authfrom->client, &tempto->client);
if (retval) {
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
if (authfrom->checksum &&
(retval = krb5_copy_checksum(authfrom->checksum, &tempto->checksum))) {
krb5_free_principal(tempto->client);
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
if (authfrom->subkey) {
retval = krb5_copy_keyblock(authfrom->subkey, &tempto->subkey);
if (retval) {
- xfree(tempto->subkey);
+ krb5_xfree(tempto->subkey);
krb5_free_checksum(tempto->checksum);
krb5_free_principal(tempto->client);
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
}
retval = krb5_copy_authdata(authfrom->authorization_data,
&tempto->authorization_data);
if (retval) {
- xfree(tempto->subkey);
+ krb5_xfree(tempto->subkey);
krb5_free_checksum(tempto->checksum);
krb5_free_principal(tempto->client);
krb5_free_authdata(tempto->authorization_data);
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
}
return ENOMEM;
*tmpad = *inad;
if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
- xfree(tmpad);
+ krb5_xfree(tmpad);
return ENOMEM;
}
memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
if (!(tempto->contents =
(krb5_octet *)malloc(tempto->length))) {
- xfree(tempto);
+ krb5_xfree(tempto);
return ENOMEM;
}
memcpy((char *) tempto->contents, (char *) ckfrom->contents,
if (retval)
goto cleanaddrs;
tempcred->ticket = *scratch;
- xfree(scratch);
+ krb5_xfree(scratch);
retval = krb5_copy_data(&incred->second_ticket, &scratch);
if (retval)
goto cleanticket;
tempcred->second_ticket = *scratch;
- xfree(scratch);
+ krb5_xfree(scratch);
retval = krb5_copy_authdata(incred->authdata,&tempcred->authdata);
if (retval)
cleanaddrs:
krb5_free_addresses(tempcred->addresses);
cleanblock:
- xfree(tempcred->keyblock.contents);
+ krb5_xfree(tempcred->keyblock.contents);
cleanserver:
krb5_free_principal(tempcred->server);
cleanclient:
krb5_free_principal(tempcred->client);
cleanlast:
- xfree(tempcred);
+ krb5_xfree(tempcred);
return retval;
}
tempdata->length = indata->length;
if (tempdata->length) {
if (!(tempdata->data = malloc(tempdata->length))) {
- xfree(tempdata);
+ krb5_xfree(tempdata);
return ENOMEM;
}
memcpy((char *)tempdata->data, (char *)indata->data, tempdata->length);
return ENOMEM;
*new_key = *from;
if (!(new_key->contents = (krb5_octet *)malloc(new_key->length))) {
- xfree(new_key);
+ krb5_xfree(new_key);
return(ENOMEM);
}
memcpy((char *)new_key->contents, (char *)from->contents,
retval = krb5_copy_keyblock(partfrom->session,
&tempto->session);
if (retval) {
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
retval = krb5_copy_principal(partfrom->client, &tempto->client);
if (retval) {
krb5_free_keyblock(tempto->session);
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
tempto->transited = partfrom->transited;
if (!tempto->transited.tr_contents.data) {
krb5_free_principal(tempto->client);
krb5_free_keyblock(tempto->session);
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
memcpy((char *)tempto->transited.tr_contents.data,
retval = krb5_copy_addresses(partfrom->caddrs, &tempto->caddrs);
if (retval) {
- xfree(tempto->transited.tr_contents.data);
+ krb5_xfree(tempto->transited.tr_contents.data);
krb5_free_principal(tempto->client);
krb5_free_keyblock(tempto->session);
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
if (partfrom->authorization_data) {
&tempto->authorization_data);
if (retval) {
krb5_free_addresses(tempto->caddrs);
- xfree(tempto->transited.tr_contents.data);
+ krb5_xfree(tempto->transited.tr_contents.data);
krb5_free_principal(tempto->client);
krb5_free_keyblock(tempto->session);
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
}
retval = krb5_copy_data(&from->enc_part.ciphertext, &scratch);
if (retval) {
krb5_free_principal(tempto->server);
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
tempto->enc_part.ciphertext = *scratch;
- xfree(scratch);
+ krb5_xfree(scratch);
retval = krb5_copy_enc_tkt_part(from->enc_part2, &tempto->enc_part2);
if (retval) {
- xfree(tempto->enc_part.ciphertext.data);
+ krb5_xfree(tempto->enc_part.ciphertext.data);
krb5_free_principal(tempto->server);
- xfree(tempto);
+ krb5_xfree(tempto);
return retval;
}
*pto = tempto;
if (!(scratch->data = realloc(scratch->data,
dec_rep->enc_part.ciphertext.length))) {
/* may destroy scratch->data */
- xfree(scratch);
+ krb5_xfree(scratch);
return ENOMEM;
}
memset(scratch->data + scratch->length, 0,
if (!(scratch->data = realloc(scratch->data,
dec_ticket->enc_part.ciphertext.length))) {
/* may destroy scratch->data */
- xfree(scratch);
+ krb5_xfree(scratch);
return ENOMEM;
}
memset(scratch->data + scratch->length, 0,
krb5_free_principal(*nrealms);
nrealms++;
}
- xfree(realms);
+ krb5_xfree(realms);
}
}
cred->ticket = *scratch;
- xfree(scratch);
+ krb5_xfree(scratch);
krb5_free_kdc_rep(dec_rep);
return 0;
}
cred->ticket = *scratch;
- xfree(scratch);
+ krb5_xfree(scratch);
krb5_free_kdc_rep(dec_rep);
return retval;
}
outtmp = (krb5_octet *)malloc(esize);
if (!outtmp) {
- xfree(intmp);
+ krb5_xfree(intmp);
krb5_free_keyblock(subkey);
return ENOMEM;
}
(void) krb5_finish_key(&eblock);
cleanup:
krb5_free_keyblock(subkey);
- xfree(intmp);
- xfree(outtmp);
+ krb5_xfree(intmp);
+ krb5_xfree(outtmp);
return retval;
}
if (retval = krb5_random_key(&eblock, random_state, subkey)) {
(void) krb5_finish_random_key(&eblock, &random_state);
- xfree(*subkey);
+ krb5_xfree(*subkey);
return retval;
}
/* ignore the error if any, since we've already gotten the key out */
if (retval = decode_krb5_error(&reply, &err_reply)) {
if (decrypt_key)
krb5_free_keyblock(decrypt_key);
- xfree(reply.data);
+ krb5_xfree(reply.data);
return retval; /* some other reply--??? */
}
/* it was an error */
krb5_free_error(err_reply);
if (decrypt_key)
krb5_free_keyblock(decrypt_key);
- xfree(reply.data);
+ krb5_xfree(reply.data);
return retval;
}
if (!krb5_is_as_rep(&reply)) {
if (decrypt_key)
krb5_free_keyblock(decrypt_key);
- xfree(reply.data);
+ krb5_xfree(reply.data);
return KRB5KRB_AP_ERR_MSG_TYPE;
}
if (retval = decode_krb5_as_rep(&reply, &as_reply)) {
if (decrypt_key)
krb5_free_keyblock(decrypt_key);
- xfree(reply.data);
+ krb5_xfree(reply.data);
return retval; /* some other reply--??? */
}
- xfree(reply.data);
+ krb5_xfree(reply.data);
if (as_reply->msg_type != KRB5_AS_REP) {
if (decrypt_key)
krb5_free_keyblock(decrypt_key);
}
#define cleanup_key() {memset((char *)creds->keyblock.contents, 0,\
creds->keyblock.length); \
- xfree(creds->keyblock.contents); \
+ krb5_xfree(creds->keyblock.contents); \
creds->keyblock.contents = 0; \
creds->keyblock.length = 0;}
return retval;
}
creds->ticket = *packet;
- xfree(packet);
+ krb5_xfree(packet);
/* store it in the ccache! */
if (retval = krb5_cc_store_cred(ccache, creds)) {
krb5_free_kdc_rep(as_reply);
/* clean up the pieces */
- xfree(creds->ticket.data);
+ krb5_xfree(creds->ticket.data);
krb5_free_addresses(creds->addresses);
cleanup_key();
return retval;
if (retval = krb5_read_password(krb5_default_pwd_prompt1,
0,
pwdbuf, &pwsize)) {
- if (f_salt) xfree(salt.data);
+ if (f_salt) krb5_xfree(salt.data);
return retval;
}
arg2 = *arg;
}
*key = (krb5_keyblock *)malloc(sizeof(**key));
if (!*key) {
- if (f_salt) xfree(salt.data);
+ if (f_salt) krb5_xfree(salt.data);
return ENOMEM;
}
if (retval = (*krb5_keytype_array[type]->system->
*key,
&arg->password,
&salt)) {
- xfree(*key);
- if (f_salt) xfree(salt.data);
+ krb5_xfree(*key);
+ if (f_salt) krb5_xfree(salt.data);
return(retval);
}
- if (f_salt) xfree(salt.data);
+ if (f_salt) krb5_xfree(salt.data);
return 0;
}
else
retval = krb5_copy_keyblock(&kt_ent.key, &realkey);
if (retval) {
- xfree(realkey);
+ krb5_xfree(realkey);
cleanup();
return retval;
}
if (retval = encode_krb5_error(dec_err, &new_enc_err))
return(retval);
*enc_err = *new_enc_err;
- xfree(new_enc_err);
+ krb5_xfree(new_enc_err);
return 0;
}
if (!(scratch->data = realloc(scratch->data,
privmsg.enc_part.ciphertext.length))) {
/* may destroy scratch->data */
- xfree(scratch);
+ krb5_xfree(scratch);
return ENOMEM;
}
memset(scratch->data + scratch->length, 0,
if (retval = krb5_rc_store(rcache, &replay)) {
/* should we really error out here? XXX */
cleanup_scratch();
- xfree(replay.client);
+ krb5_xfree(replay.client);
return retval;
}
- xfree(replay.client);
+ krb5_xfree(replay.client);
}
*outbuf = *scratch;
- xfree(scratch);
+ krb5_xfree(scratch);
return 0;
clean_prockey:
if (!(scratch->data = realloc(scratch->data,
reply.enc_part.ciphertext.length))) {
/* may destroy scratch->data */
- xfree(scratch);
+ krb5_xfree(scratch);
return ENOMEM;
}
memset(scratch->data + scratch->length, 0,
if (!(retval = encode_krb5_ap_rep(&reply, &toutbuf))) {
*outbuf = *toutbuf;
- xfree(toutbuf);
+ krb5_xfree(toutbuf);
}
cleanup_encpart();
return retval;
scratch->length,
(krb5_pointer) key->contents,
key->length, &safe_checksum)) {
- xfree(safe_checksum.contents);
+ krb5_xfree(safe_checksum.contents);
clean_scratch();
return retval;
}
safemsg.checksum = &safe_checksum;
clean_scratch();
if (retval = encode_krb5_safe(&safemsg, &scratch)) {
- xfree(safe_checksum.contents);
+ krb5_xfree(safe_checksum.contents);
return retval;
}
- xfree(safe_checksum.contents);
+ krb5_xfree(safe_checksum.contents);
if (!(safe_flags & KRB5_SAFE_NOTIME)) {
krb5_donot_replay replay;
if (retval = krb5_rc_store(rcache, &replay)) {
/* should we really error out here? XXX */
clean_scratch();
- xfree(replay.client);
+ krb5_xfree(replay.client);
return retval;
}
- xfree(replay.client);
+ krb5_xfree(replay.client);
}
*outbuf = *scratch;
- xfree(scratch);
+ krb5_xfree(scratch);
return 0;
}
*/
tmpdata = malloc(realmsize+1);
if (tmpdata == 0) {
- xfree(principal->data);
- xfree(principal);
+ krb5_xfree(principal->data);
+ krb5_xfree(principal);
return ENOMEM;
}
krb5_princ_set_realm_data(principal, tmpdata);
malloc(krb5_princ_component(principal, i)->length + 1);
if (!tmpdata) {
for (i--; i >= 0; i--)
- xfree(krb5_princ_component(principal, i)->data);
- xfree(krb5_princ_realm(principal)->data);
- xfree(principal->data);
- xfree(principal);
+ krb5_xfree(krb5_princ_component(principal, i)->data);
+ krb5_xfree(krb5_princ_realm(principal)->data);
+ krb5_xfree(principal->data);
+ krb5_xfree(principal);
return(ENOMEM);
}
krb5_princ_component(principal, i)->data = tmpdata;
return retval;
}
-#define cleanup_privmsg() {(void)xfree(privmsg->enc_part.ciphertext.data); (void)xfree(privmsg);}
+#define cleanup_privmsg() {(void)krb5_xfree(privmsg->enc_part.ciphertext.data); (void)krb5_xfree(privmsg);}
if (!valid_etype(privmsg->enc_part.etype)) {
cleanup_privmsg();
return KRB5_PROG_ETYPE_NOSUPP;
return ENOMEM;
}
-#define cleanup_scratch() {(void)memset(scratch.data, 0, scratch.length); (void)xfree(scratch.data);}
+#define cleanup_scratch() {(void)memset(scratch.data, 0, scratch.length); (void)krb5_xfree(scratch.data);}
/* do any necessary key pre-processing */
if (retval = krb5_process_key(&eblock, key)) {
}
cleanup_scratch();
-#define cleanup_data() {(void)memset(privmsg_enc_part->user_data.data,0,privmsg_enc_part->user_data.length); (void)xfree(privmsg_enc_part->user_data.data);}
-#define cleanup_mesg() {(void)xfree(privmsg_enc_part);}
+#define cleanup_data() {(void)memset(privmsg_enc_part->user_data.data,0,privmsg_enc_part->user_data.length); (void)krb5_xfree(privmsg_enc_part->user_data.data);}
+#define cleanup_mesg() {(void)krb5_xfree(privmsg_enc_part);}
if (!(priv_flags & KRB5_PRIV_NOTIME)) {
krb5_donot_replay replay;
replay.cusec = privmsg_enc_part->usec;
replay.ctime = privmsg_enc_part->timestamp;
if (retval = krb5_rc_store(rcache, &replay)) {
- xfree(replay.client);
+ krb5_xfree(replay.client);
cleanup_data();
cleanup_mesg();
return retval;
}
- xfree(replay.client);
+ krb5_xfree(replay.client);
}
if (priv_flags & KRB5_PRIV_DOSEQUENCE)
if (retval)
goto cleanup;
retval = krb5_rc_store(rcache, &rep);
- xfree(rep.server);
- xfree(rep.client);
+ krb5_xfree(rep.server);
+ krb5_xfree(rep.client);
if (retval)
goto cleanup;
}
sender_addr, 0,
0, 0, rcache, authdat);
krb5_rc_close(rcache);
- xfree(rcache);
+ krb5_xfree(rcache);
}
krb5_free_ap_req(request);
replay.cusec = message->usec;
replay.ctime = message->timestamp;
if (retval = krb5_rc_store(rcache, &replay)) {
- xfree(replay.client);
+ krb5_xfree(replay.client);
cleanup();
return retval;
}
- xfree(replay.client);
+ krb5_xfree(replay.client);
}
if (safe_flags & KRB5_SAFE_DOSEQUENCE)
}
#undef cleanup
-#define cleanup() {krb5_free_safe(message); xfree(our_cksum.contents);}
+#define cleanup() {krb5_free_safe(message); krb5_xfree(our_cksum.contents);}
retval = krb5_calculate_checksum(his_cksum->checksum_type,
scratch->data, scratch->length,
*outbuf = message->user_data;
- xfree(our_cksum.contents);
+ krb5_xfree(our_cksum.contents);
if (message->s_address)
krb5_free_address(message->s_address);
if (message->r_address)
krb5_free_address(message->r_address);
krb5_free_checksum(his_cksum);
- xfree(message);
+ krb5_xfree(message);
return 0;
}
if (retval = krb5_read_message(fd, &inbuf))
return(retval);
if (strcmp(inbuf.data, sendauth_version)) {
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
problem = KRB5_SENDAUTH_BADAUTHVERS;
}
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
/*
* Do the same thing for the application version string.
*/
if (retval = krb5_read_message(fd, &inbuf))
return(retval);
if (strcmp(inbuf.data, appl_version)) {
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
if (!problem)
problem = KRB5_SENDAUTH_BADAPPLVERS;
}
- xfree(inbuf.data);
+ krb5_xfree(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(&inbuf, server, sender_addr, fetch_from,
keyproc, keyprocarg, rcache, &authdat);
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
#ifdef WORKING_RCACHE
if (rcache)
retval = krb5_rc_close(rcache);
}
if (retval = krb5_write_message(fd, &outbuf)) {
if (outbuf.data)
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
if (!problem)
krb5_free_tkt_authent(authdat);
return(retval);
return(retval);
}
if (retval = krb5_write_message(fd, &outbuf)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
krb5_free_tkt_authent(authdat);
return(retval);
}
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
}
/*
* At this point, we've won. We just need to copy whatever
*authent = authdat->authenticator;
else
krb5_free_authenticator(authdat->authenticator);
- xfree(authdat);
+ krb5_xfree(authdat);
return 0;
}
if (!(scratch->data = realloc(scratch->data,
tgsreq.authorization_data.ciphertext.length))) {
/* may destroy scratch->data */
- xfree(scratch);
+ krb5_xfree(scratch);
return ENOMEM;
}
memset(scratch->data + scratch->length, 0,
(krb5_pointer) tgsreq.authorization_data.ciphertext.data,
scratch->length, &eblock, 0)) {
(void) krb5_finish_key(&eblock);
- xfree(tgsreq.authorization_data.ciphertext.data);
+ krb5_xfree(tgsreq.authorization_data.ciphertext.data);
krb5_free_data(scratch);
return retval;
}
krb5_free_data(scratch);
if (retval = krb5_finish_key(&eblock)) {
- xfree(tgsreq.authorization_data.ciphertext.data);
+ krb5_xfree(tgsreq.authorization_data.ciphertext.data);
return retval;
}
}
#define cleanup_authdata() { if (tgsreq.authorization_data.ciphertext.data) {\
(void) memset(tgsreq.authorization_data.ciphertext.data, 0,\
tgsreq.authorization_data.ciphertext.length); \
- xfree(tgsreq.authorization_data.ciphertext.data);}}
+ krb5_xfree(tgsreq.authorization_data.ciphertext.data);}}
&ap_checksum)) {
if (sec_ticket)
krb5_free_ticket(sec_ticket);
- xfree(ap_checksum.contents);
+ krb5_xfree(ap_checksum.contents);
krb5_free_data(scratch);
cleanup_authdata();
return retval;
/* done with body */
krb5_free_data(scratch);
-#define cleanup() {xfree(ap_checksum.contents);\
+#define cleanup() {krb5_xfree(ap_checksum.contents);\
if (sec_ticket) krb5_free_ticket(sec_ticket);}
/* attach ap_req to the tgsreq */
if (!combined_padata) {
cleanup();
cleanup_authdata();
- xfree(ap_req_padata.contents);
+ krb5_xfree(ap_req_padata.contents);
return ENOMEM;
}
combined_padata[0] = &ap_req_padata;
if (!combined_padata) {
cleanup();
cleanup_authdata();
- xfree(ap_req_padata.contents);
+ krb5_xfree(ap_req_padata.contents);
return ENOMEM;
}
combined_padata[0] = &ap_req_padata;
if (retval = encode_krb5_tgs_req(&tgsreq, &scratch)) {
cleanup();
cleanup_authdata();
- xfree(combined_padata);
- xfree(ap_req_padata.contents);
+ krb5_xfree(combined_padata);
+ krb5_xfree(ap_req_padata.contents);
return(retval);
}
if (sec_ticket)
krb5_free_ticket(sec_ticket);
cleanup_authdata();
- xfree(combined_padata);
- xfree(ap_req_padata.contents);
+ krb5_xfree(combined_padata);
+ krb5_xfree(ap_req_padata.contents);
#undef cleanup_authdata
#undef cleanup
-#define cleanup() {xfree(ap_checksum.contents);}
+#define cleanup() {krb5_xfree(ap_checksum.contents);}
/* now send request & get response from KDC */
retval = krb5_sendto_kdc(scratch, krb5_princ_realm(sname),
if (inbuf.length) {
if (error) {
if (retval = krb5_rd_error(&inbuf, error)) {
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
return(retval);
}
}
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
krb5_free_cred_contents(&creds);
memset((char *)&authent, 0, sizeof(authent));
return(KRB5_SENDAUTH_REJECTED);
problem = KRB5_SENDAUTH_MUTUAL_FAILED;
memset((char *)&authent, 0, sizeof(authent));
krb5_free_cred_contents(&creds);
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
if (problem) {
krb5_free_ap_rep_enc_part(repl);
return(problem);
} else
retval = ENOMEM;
}
- xfree(rcache);
+ krb5_xfree(rcache);
} else
retval = ENOMEM;
return retval;
i = 1;
if (retval = krb5_tgtname(client,
client, &rettree[0])) {
- xfree(rettree);
+ krb5_xfree(rettree);
return retval;
}
for (prevccp = ccp = client->data;
krb5_free_principal(rettree[i-1]);
i--;
}
- xfree(rettree);
+ krb5_xfree(rettree);
return retval;
}
prevccp = ccp;
krb5_free_principal(rettree[i-1]);
i--;
}
- xfree(rettree);
+ krb5_xfree(rettree);
return retval;
}
i++;
krb5_free_principal(rettree[i-1]);
i--;
}
- xfree(rettree);
+ krb5_xfree(rettree);
return retval;
}
prevscp = scp + 1;
krb5_free_principal(rettree[i-1]);
i--;
}
- xfree(rettree);
+ krb5_xfree(rettree);
return retval;
}
}
db = dbm_open(krb5_lname_file, O_RDONLY, 0600);
if (!db) {
- xfree(princ_name);
+ krb5_xfree(princ_name);
return KRB5_LNAME_CANTOPEN;
}
contents = dbm_fetch(db, key);
- xfree(princ_name);
+ krb5_xfree(princ_name);
if (contents.dptr == NULL) {
retval = KRB5_LNAME_NOTRANS;
for (cp = hostlist; *cp; cp++)
free(*cp);
- xfree(hostlist);
+ krb5_xfree(hostlist);
return 0;
}
2*sizeof(temptype) + 2*sizeof(templength);
if (!(retaddr->contents = (krb5_octet *)malloc(retaddr->length))) {
- xfree(retaddr);
+ krb5_xfree(retaddr);
return ENOMEM;
}
marshal = retaddr->contents;
if (!rethlist[hlindex]) {
for (--hlindex; hlindex >= 0; hlindex--)
free(rethlist[hlindex]);
- xfree(rethlist);
+ krb5_xfree(rethlist);
rethlist = 0;
retval = ENOMEM;
break;
(void) fclose(config_file);
if (hlindex == 0) {
- xfree(rethlist);
+ krb5_xfree(rethlist);
rethlist = 0;
retval = KRB5_REALM_UNKNOWN;
}
char *cp;
if (!(retrealms[0] = malloc(strlen(&domain[1])+1))) {
- xfree(retrealms);
+ krb5_xfree(retrealms);
return ENOMEM;
}
strcpy(retrealms[0], &domain[1]);
*cp = toupper(*cp);
} else {
if (retval = krb5_get_default_realm(&retrealms[0])) {
- xfree(retrealms);
+ krb5_xfree(retrealms);
return retval;
}
}
if ((trans_file = fopen(krb5_trans_file, "r")) == (FILE *) 0) {
- xfree(retrealms[0]);
- xfree(retrealms);
+ krb5_xfree(retrealms[0]);
+ krb5_xfree(retrealms);
return KRB5_TRANS_CANTOPEN;
}
(void) sprintf(scanstring, "%%%ds %%%ds",
/* exact match of hostname, so return the realm */
if (!(retrealms[0] = realloc(retrealms[0],
strlen(trans_realm)+1))) {
- xfree(retrealms);
+ krb5_xfree(retrealms);
return ENOMEM;
}
(void) strcpy(retrealms[0], trans_realm);
/* domain match, save for later */
if (!(retrealms[0] = realloc(retrealms[0],
strlen(trans_realm)+1))) {
- xfree(retrealms);
+ krb5_xfree(retrealms);
return ENOMEM;
}
(void) strcpy(retrealms[0], trans_realm);
address->length = sizeof(struct in_addr);
address->contents = (unsigned char *)malloc(address->length);
if (!address->contents) {
- xfree(address);
+ krb5_xfree(address);
address = 0;
mem_err++;
} else {
address->length = sizeof(struct ns_addr);
address->contents = (unsigned char *)malloc(address->length);
if (!address->contents) {
- xfree(address);
+ krb5_xfree(address);
address = 0;
mem_err++;
} else {
if (mem_err) {
for (i=0; i<n_found; i++) {
- xfree(addr_temp[i]);
+ krb5_xfree(addr_temp[i]);
addr_temp[i] = 0;
}
return ENOMEM;
return(ENOMEM);
}
if ((len2 = krb5_net_read(fd, buf, len)) != len) {
- xfree(buf);
+ krb5_xfree(buf);
return((len2 < 0) ? errno : ECONNABORTED);
}
}
/* interrupted */
if (readin_string) {
(void) memset((char *)readin_string, 0, *size_return);
- xfree(readin_string);
+ krb5_xfree(readin_string);
}
(void) memset(return_pwd, 0, *size_return);
cleanup(KRB5_LIBOS_PWDINTR);
(void) putchar('\n');
(void) memset((char *)readin_string, 0, *size_return);
(void) memset(return_pwd, 0, *size_return);
- xfree(readin_string);
+ krb5_xfree(readin_string);
cleanup(KRB5_LIBOS_CANTREADPWD);
}
(void) putchar('\n');
if (strncmp(return_pwd, (char *)readin_string, *size_return)) {
(void) memset((char *)readin_string, 0, *size_return);
(void) memset(return_pwd, 0, *size_return);
- xfree(readin_string);
+ krb5_xfree(readin_string);
cleanup(KRB5_LIBOS_BADPWDMATCH);
}
(void) memset((char *)readin_string, 0, *size_return);
- xfree(readin_string);
+ krb5_xfree(readin_string);
}
/* reset intrfunc */
socklist[i] = -1;
if (!(reply->data = malloc(krb5_max_dgram_size))) {
- xfree(addr);
+ krb5_xfree(addr);
return ENOMEM;
}
reply->length = krb5_max_dgram_size;
for (i = 0; i < AF_MAX; i++)
if (socklist[i] != -1)
(void) close(socklist[i]);
- xfree(addr);
+ krb5_xfree(addr);
if (retval) {
free(reply->data);
reply->data = 0;
}
if (!hrealms[0]) {
free(remote_host);
- xfree(hrealms);
+ krb5_xfree(hrealms);
return KRB5_ERR_HOST_REALM_UNKNOWN;
}
exit(1);
}
if (retval = krb5_write_message((void *) &fd, &outbuf)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
com_err(progname, retval, "while sending database size");
exit(1);
}
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
/*
* Initialize the initial vector.
*/
exit(1);
}
if (retval = krb5_write_message((void *) &fd, &outbuf)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
com_err(progname, retval,
"while sending database block starting at %d",
sent_size);
exit(1);
}
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
sent_size += n;
if (debug)
printf("%d bytes sent.\n", sent_size);
strcpy(error.text.data, text);
if (!krb5_mk_error(&error, &outbuf)) {
(void) krb5_write_message((void *) &fd, &outbuf);
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
}
free(error.text.data);
}
KRB5_SAFE_DOSEQUENCE|KRB5_SAFE_NOTIME,
0, &outbuf)) {
send_error(fd, retval, "while decoding database size");
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
com_err(progname, retval,
"while decoding database size from client");
exit(1);
}
memcpy((char *) &database_size, outbuf.data, sizeof(database_size));
- xfree(inbuf.data);
- xfree(outbuf.data);
+ krb5_xfree(inbuf.data);
+ krb5_xfree(outbuf.data);
database_size = ntohl(database_size);
/*
* Initialize the initial vector.
received_size);
com_err(progname, retval, buf);
send_error(fd, retval, buf);
- xfree(inbuf.data);
+ krb5_xfree(inbuf.data);
exit(1);
}
n = write(database_fd, outbuf.data, outbuf.length);
- xfree(inbuf.data);
- xfree(outbuf.data);
+ krb5_xfree(inbuf.data);
+ krb5_xfree(outbuf.data);
if (n < 0) {
sprintf(buf,
"while writing database block starting at offset %d",
exit(1);
}
if (retval = krb5_write_message((void *) &fd, &outbuf)) {
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
com_err(progname, retval,
"while sending # of receeived bytes");
exit(1);
}
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
}
strcpy(error.text.data, text);
if (!krb5_mk_error(&error, &outbuf)) {
(void) krb5_write_message((void *) &fd, &outbuf);
- xfree(outbuf.data);
+ krb5_xfree(outbuf.data);
}
free(error.text.data);
}
return(code);
errout:
- if (*key) xfree(*key);
+ if (*key) krb5_xfree(*key);
goto out;
}
krb5_free_tkt_authent(authdat);
krb5_free_principal(server);
- if (request_data.data) xfree(request_data.data);
+ if (request_data.data) krb5_xfree(request_data.data);
return(0);
}