(void) krb5_finish_key(util_context, &master_encblock);
(void) krb5_finish_random_key(util_context, &master_encblock,
&master_random);
- memset((char *)master_keyblock.contents, 0,
- master_keyblock.length);
- krb5_xfree(master_keyblock.contents);
+ krb5_free_keyblock_contents(util_context, &master_keyblock);
master_keyblock.contents = NULL;
valid_master_key = 0;
}
) {
com_err(progname, retval, "while verifying master key");
exit_status++;
- memset((char *)master_keyblock.contents, 0, master_keyblock.length);
- krb5_xfree(master_keyblock.contents);
+ krb5_free_keyblock_contents(util_context, &master_keyblock);
return(1);
}
if ((retval = krb5_process_key(util_context, &master_encblock,
com_err(progname, retval, "while processing master key");
exit_status++;
memset((char *)master_keyblock.contents, 0, master_keyblock.length);
- krb5_xfree(master_keyblock.contents);
+ krb5_free_keyblock_contents(util_context, &master_keyblock);
return(1);
}
if ((retval = krb5_init_random_key(util_context, &master_encblock,
exit_status++;
(void) krb5_finish_key(util_context, &master_encblock);
memset((char *)master_keyblock.contents, 0, master_keyblock.length);
- krb5_xfree(master_keyblock.contents);
+ krb5_free_keyblock_contents(util_context, &master_keyblock);
return(1);
}
for (lp = list; lp;) {
retval = krb5_kt_free_entry(context, lp->entry);
- krb5_xfree(lp->entry);
+ free((char *)lp->entry);
if (retval)
break;
prev = lp;
lp = lp->next;
- krb5_xfree(prev);
+ free((char *)prev);
}
return retval;
}
lp->entry = entry;
}
if (entry)
- krb5_xfree(entry);
+ free((char *)entry);
if (retval)
if (retval == KRB5_KT_END)
retval = 0;
if (entry) {
if (entry->magic == KV5M_KEYTAB_ENTRY)
krb5_kt_free_entry(context, entry);
- krb5_xfree(entry);
+ free((char *)entry);
}
if (retval) {
ktutil_free_kt_list(context, tail);
for (lp = pruned; lp;) {
prev = lp;
lp = lp->next;
- krb5_xfree(prev);
+ free((char *)prev);
}
return retval;
}
/* Clear and free password storage */
if (opassword) {
memset(opassword, 0, KRB5_ADM_MAX_PASSWORD_LEN);
- krb5_xfree(opassword);
+ free(opassword);
}
if (npassword) {
memset(npassword, 0, KRB5_ADM_MAX_PASSWORD_LEN);
done:
krb5_adm_disconnect(kcontext, &conn_socket, auth_context, ccache);
- krb5_xfree(kcontext);
+ krb5_free_context(kcontext);
return(error);
}
if (!er_kret)
krb5_write_message(kcontext, (krb5_pointer) &cl_sock, &errout);
free(errbuf.text.data);
- krb5_xfree(errout.data);
+ krb5_free_data_contents(kcontext, &errout);
}
cleanup:
if (num_args)
krb5_free_adm_data(kcontext, num_args, arglist);
if (in_data.data)
- krb5_xfree(in_data.data);
+ krb5_free_data_contents(kcontext, &in_data);
if (out_data.data)
- krb5_xfree(out_data.data);
+ krb5_free_data_contents(kcontext, &out_data);
if (local && local->contents)
free(local->contents);
if (remote && remote->contents)