summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/krb/kfree.c
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
committerTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
commit02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch)
tree61b9147863cd8be3eff63903dc36cae168254bd5 /src/lib/krb5/krb/kfree.c
parent162ab371748cba0cc6f172419bd6e71fa04bb878 (diff)
downloadkrb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.xz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip
make mark-cstyle
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/kfree.c')
-rw-r--r--src/lib/krb5/krb/kfree.c354
1 files changed, 177 insertions, 177 deletions
diff --git a/src/lib/krb5/krb/kfree.c b/src/lib/krb5/krb/kfree.c
index 801eed0da7..c372e70b6c 100644
--- a/src/lib/krb5/krb/kfree.c
+++ b/src/lib/krb5/krb/kfree.c
@@ -1,3 +1,4 @@
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* lib/krb5/free/f_addr.c
*
@@ -7,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -21,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* krb5_free_address()
*/
@@ -60,7 +61,7 @@ void KRB5_CALLCONV
krb5_free_address(krb5_context context, krb5_address *val)
{
if (val == NULL)
- return;
+ return;
free(val->contents);
free(val);
}
@@ -71,10 +72,10 @@ krb5_free_addresses(krb5_context context, krb5_address **val)
register krb5_address **temp;
if (val == NULL)
- return;
+ return;
for (temp = val; *temp; temp++) {
- free((*temp)->contents);
- free(*temp);
+ free((*temp)->contents);
+ free(*temp);
}
free(val);
}
@@ -82,18 +83,18 @@ krb5_free_addresses(krb5_context context, krb5_address **val)
void KRB5_CALLCONV
krb5_free_alt_method(krb5_context context,
- krb5_alt_method *alt)
+ krb5_alt_method *alt)
{
if (alt) {
- free(alt->data);
- free(alt);
+ free(alt->data);
+ free(alt);
}
}
void KRB5_CALLCONV
krb5_free_ap_rep(krb5_context context, register krb5_ap_rep *val)
{
if (val == NULL)
- return;
+ return;
free(val->enc_part.ciphertext.data);
free(val);
}
@@ -102,7 +103,7 @@ void KRB5_CALLCONV
krb5_free_ap_req(krb5_context context, register krb5_ap_req *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_ticket(context, val->ticket);
free(val->authenticator.ciphertext.data);
free(val);
@@ -112,7 +113,7 @@ void KRB5_CALLCONV
krb5_free_ap_rep_enc_part(krb5_context context, krb5_ap_rep_enc_part *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_keyblock(context, val->subkey);
free(val);
}
@@ -121,7 +122,7 @@ void KRB5_CALLCONV
krb5_free_authenticator_contents(krb5_context context, krb5_authenticator *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_checksum(context, val->checksum);
val->checksum = 0;
krb5_free_principal(context, val->client);
@@ -138,10 +139,10 @@ krb5_free_authdata(krb5_context context, krb5_authdata **val)
register krb5_authdata **temp;
if (val == NULL)
- return;
+ return;
for (temp = val; *temp; temp++) {
- free((*temp)->contents);
- free(*temp);
+ free((*temp)->contents);
+ free(*temp);
}
free(val);
}
@@ -150,7 +151,7 @@ void KRB5_CALLCONV
krb5_free_authenticator(krb5_context context, krb5_authenticator *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_authenticator_contents(context, val);
free(val);
}
@@ -159,7 +160,7 @@ void KRB5_CALLCONV
krb5_free_checksum(krb5_context context, register krb5_checksum *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_checksum_contents(context, val);
free(val);
}
@@ -168,7 +169,7 @@ void KRB5_CALLCONV
krb5_free_checksum_contents(krb5_context context, register krb5_checksum *val)
{
if (val == NULL)
- return;
+ return;
free(val->contents);
val->contents = NULL;
}
@@ -177,7 +178,7 @@ void KRB5_CALLCONV
krb5_free_cred(krb5_context context, register krb5_cred *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_tickets(context, val->tickets);
free(val->enc_part.ciphertext.data);
free(val);
@@ -185,14 +186,14 @@ krb5_free_cred(krb5_context context, register krb5_cred *val)
/*
* krb5_free_cred_contents zeros out the session key, and then frees
- * the credentials structures
+ * the credentials structures
*/
void KRB5_CALLCONV
krb5_free_cred_contents(krb5_context context, krb5_creds *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_principal(context, val->client);
val->client = 0;
krb5_free_principal(context, val->server);
@@ -208,28 +209,28 @@ krb5_free_cred_contents(krb5_context context, krb5_creds *val)
val->authdata = 0;
}
-void KRB5_CALLCONV
+void KRB5_CALLCONV
krb5_free_cred_enc_part(krb5_context context, register krb5_cred_enc_part *val)
{
register krb5_cred_info **temp;
-
+
if (val == NULL)
- return;
+ return;
krb5_free_address(context, val->r_address);
val->r_address = 0;
krb5_free_address(context, val->s_address);
val->s_address = 0;
if (val->ticket_info) {
- for (temp = val->ticket_info; *temp; temp++) {
- krb5_free_keyblock(context, (*temp)->session);
- krb5_free_principal(context, (*temp)->client);
- krb5_free_principal(context, (*temp)->server);
- krb5_free_addresses(context, (*temp)->caddrs);
- free(*temp);
- }
- free(val->ticket_info);
- val->ticket_info = 0;
+ for (temp = val->ticket_info; *temp; temp++) {
+ krb5_free_keyblock(context, (*temp)->session);
+ krb5_free_principal(context, (*temp)->client);
+ krb5_free_principal(context, (*temp)->server);
+ krb5_free_addresses(context, (*temp)->caddrs);
+ free(*temp);
+ }
+ free(val->ticket_info);
+ val->ticket_info = 0;
}
}
@@ -238,7 +239,7 @@ void KRB5_CALLCONV
krb5_free_creds(krb5_context context, krb5_creds *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_cred_contents(context, val);
free(val);
}
@@ -248,7 +249,7 @@ void KRB5_CALLCONV
krb5_free_data(krb5_context context, krb5_data *val)
{
if (val == NULL)
- return;
+ return;
free(val->data);
free(val);
}
@@ -257,10 +258,10 @@ void KRB5_CALLCONV
krb5_free_data_contents(krb5_context context, krb5_data *val)
{
if (val == NULL)
- return;
+ return;
if (val->data) {
- free(val->data);
- val->data = 0;
+ free(val->data);
+ val->data = 0;
}
}
@@ -268,7 +269,7 @@ void KRB5_CALLCONV
krb5_free_enc_data(krb5_context context, krb5_enc_data *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_data_contents(context, &val->ciphertext);
free(val);
}
@@ -278,21 +279,21 @@ void krb5_free_etype_info(krb5_context context, krb5_etype_info info)
int i;
if (info == NULL)
- return;
+ return;
for (i=0; info[i] != NULL; i++) {
- free(info[i]->salt);
- krb5_free_data_contents(context, &info[i]->s2kparams);
- free(info[i]);
+ free(info[i]->salt);
+ krb5_free_data_contents(context, &info[i]->s2kparams);
+ free(info[i]);
}
free(info);
}
-
+
void KRB5_CALLCONV
krb5_free_enc_kdc_rep_part(krb5_context context, register krb5_enc_kdc_rep_part *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_keyblock(context, val->session);
krb5_free_last_req(context, val->last_req);
krb5_free_principal(context, val->server);
@@ -305,7 +306,7 @@ void KRB5_CALLCONV
krb5_free_enc_tkt_part(krb5_context context, krb5_enc_tkt_part *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_keyblock(context, val->session);
krb5_free_principal(context, val->client);
free(val->transited.tr_contents.data);
@@ -319,7 +320,7 @@ void KRB5_CALLCONV
krb5_free_error(krb5_context context, register krb5_error *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_principal(context, val->client);
krb5_free_principal(context, val->server);
free(val->text.data);
@@ -331,7 +332,7 @@ void KRB5_CALLCONV
krb5_free_kdc_rep(krb5_context context, krb5_kdc_rep *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_pa_data(context, val->padata);
krb5_free_principal(context, val->client);
krb5_free_ticket(context, val->ticket);
@@ -345,7 +346,7 @@ void KRB5_CALLCONV
krb5_free_kdc_req(krb5_context context, krb5_kdc_req *val)
{
if (val == NULL)
- return;
+ return;
assert( val->kdc_state == NULL);
krb5_free_pa_data(context, val->padata);
krb5_free_principal(context, val->client);
@@ -378,9 +379,9 @@ krb5_free_last_req(krb5_context context, krb5_last_req_entry **val)
register krb5_last_req_entry **temp;
if (val == NULL)
- return;
+ return;
for (temp = val; *temp; temp++)
- free(*temp);
+ free(*temp);
free(val);
}
@@ -390,10 +391,10 @@ krb5_free_pa_data(krb5_context context, krb5_pa_data **val)
register krb5_pa_data **temp;
if (val == NULL)
- return;
+ return;
for (temp = val; *temp; temp++) {
- free((*temp)->contents);
- free(*temp);
+ free((*temp)->contents);
+ free(*temp);
}
free(val);
}
@@ -404,13 +405,13 @@ krb5_free_principal(krb5_context context, krb5_principal val)
register krb5_int32 i;
if (!val)
- return;
-
+ return;
+
if (val->data) {
- i = krb5_princ_size(context, val);
- while(--i >= 0)
- free(krb5_princ_component(context, val, i)->data);
- free(val->data);
+ i = krb5_princ_size(context, val);
+ while(--i >= 0)
+ free(krb5_princ_component(context, val, i)->data);
+ free(val->data);
}
free(val->realm.data);
free(val);
@@ -420,7 +421,7 @@ void KRB5_CALLCONV
krb5_free_priv(krb5_context context, register krb5_priv *val)
{
if (val == NULL)
- return;
+ return;
free(val->enc_part.ciphertext.data);
free(val);
}
@@ -429,7 +430,7 @@ void KRB5_CALLCONV
krb5_free_priv_enc_part(krb5_context context, register krb5_priv_enc_part *val)
{
if (val == NULL)
- return;
+ return;
free(val->user_data.data);
krb5_free_address(context, val->r_address);
krb5_free_address(context, val->s_address);
@@ -440,7 +441,7 @@ void KRB5_CALLCONV
krb5_free_pwd_data(krb5_context context, krb5_pwd_data *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_pwd_sequences(context, val->element);
free(val);
}
@@ -448,10 +449,10 @@ krb5_free_pwd_data(krb5_context context, krb5_pwd_data *val)
void KRB5_CALLCONV
krb5_free_passwd_phrase_element(krb5_context context,
- passwd_phrase_element *val)
+ passwd_phrase_element *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_data(context, val->passwd);
val->passwd = NULL;
krb5_free_data(context, val->phrase);
@@ -466,9 +467,9 @@ krb5_free_pwd_sequences(krb5_context context, passwd_phrase_element **val)
register passwd_phrase_element **temp;
if (val == NULL)
- return;
+ return;
for (temp = val; *temp; temp++)
- krb5_free_passwd_phrase_element(context, *temp);
+ krb5_free_passwd_phrase_element(context, *temp);
free(val);
}
@@ -477,7 +478,7 @@ void KRB5_CALLCONV
krb5_free_safe(krb5_context context, register krb5_safe *val)
{
if (val == NULL)
- return;
+ return;
free(val->user_data.data);
krb5_free_address(context, val->r_address);
krb5_free_address(context, val->s_address);
@@ -490,7 +491,7 @@ void KRB5_CALLCONV
krb5_free_ticket(krb5_context context, krb5_ticket *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_principal(context, val->server);
free(val->enc_part.ciphertext.data);
krb5_free_enc_tkt_part(context, val->enc_part2);
@@ -503,7 +504,7 @@ krb5_free_tickets(krb5_context context, krb5_ticket **val)
register krb5_ticket **temp;
if (val == NULL)
- return;
+ return;
for (temp = val; *temp; temp++)
krb5_free_ticket(context, *temp);
free(val);
@@ -515,9 +516,9 @@ krb5_free_tgt_creds(krb5_context context, krb5_creds **tgts)
{
register krb5_creds **tgtpp;
if (tgts == NULL)
- return;
+ return;
for (tgtpp = tgts; *tgtpp; tgtpp++)
- krb5_free_creds(context, *tgtpp);
+ krb5_free_creds(context, *tgtpp);
free(tgts);
}
@@ -525,7 +526,7 @@ void KRB5_CALLCONV
krb5_free_tkt_authent(krb5_context context, krb5_tkt_authent *val)
{
if (val == NULL)
- return;
+ return;
krb5_free_ticket(context, val->ticket);
krb5_free_authenticator(context, val->authenticator);
free(val);
@@ -535,14 +536,14 @@ void KRB5_CALLCONV
krb5_free_unparsed_name(krb5_context context, char *val)
{
if (val != NULL)
- free(val);
+ free(val);
}
void KRB5_CALLCONV
krb5_free_sam_challenge(krb5_context ctx, krb5_sam_challenge *sc)
{
if (!sc)
- return;
+ return;
krb5_free_sam_challenge_contents(ctx, sc);
free(sc);
}
@@ -551,7 +552,7 @@ void KRB5_CALLCONV
krb5_free_sam_challenge_2(krb5_context ctx, krb5_sam_challenge_2 *sc2)
{
if (!sc2)
- return;
+ return;
krb5_free_sam_challenge_2_contents(ctx, sc2);
free(sc2);
}
@@ -560,79 +561,79 @@ void KRB5_CALLCONV
krb5_free_sam_challenge_contents(krb5_context ctx, krb5_sam_challenge *sc)
{
if (!sc)
- return;
+ return;
if (sc->sam_type_name.data)
- krb5_free_data_contents(ctx, &sc->sam_type_name);
+ krb5_free_data_contents(ctx, &sc->sam_type_name);
if (sc->sam_track_id.data)
- krb5_free_data_contents(ctx, &sc->sam_track_id);
+ krb5_free_data_contents(ctx, &sc->sam_track_id);
if (sc->sam_challenge_label.data)
- krb5_free_data_contents(ctx, &sc->sam_challenge_label);
+ krb5_free_data_contents(ctx, &sc->sam_challenge_label);
if (sc->sam_challenge.data)
- krb5_free_data_contents(ctx, &sc->sam_challenge);
+ krb5_free_data_contents(ctx, &sc->sam_challenge);
if (sc->sam_response_prompt.data)
- krb5_free_data_contents(ctx, &sc->sam_response_prompt);
+ krb5_free_data_contents(ctx, &sc->sam_response_prompt);
if (sc->sam_pk_for_sad.data)
- krb5_free_data_contents(ctx, &sc->sam_pk_for_sad);
+ krb5_free_data_contents(ctx, &sc->sam_pk_for_sad);
free(sc->sam_cksum.contents);
sc->sam_cksum.contents = 0;
}
void KRB5_CALLCONV
krb5_free_sam_challenge_2_contents(krb5_context ctx,
- krb5_sam_challenge_2 *sc2)
+ krb5_sam_challenge_2 *sc2)
{
krb5_checksum **cksump;
if (!sc2)
- return;
+ return;
if (sc2->sam_challenge_2_body.data)
- krb5_free_data_contents(ctx, &sc2->sam_challenge_2_body);
+ krb5_free_data_contents(ctx, &sc2->sam_challenge_2_body);
if (sc2->sam_cksum) {
- cksump = sc2->sam_cksum;
- while (*cksump) {
- krb5_free_checksum(ctx, *cksump);
- cksump++;
- }
- free(sc2->sam_cksum);
- sc2->sam_cksum = 0;
+ cksump = sc2->sam_cksum;
+ while (*cksump) {
+ krb5_free_checksum(ctx, *cksump);
+ cksump++;
+ }
+ free(sc2->sam_cksum);
+ sc2->sam_cksum = 0;
}
}
void KRB5_CALLCONV
krb5_free_sam_challenge_2_body(krb5_context ctx,
- krb5_sam_challenge_2_body *sc2)
+ krb5_sam_challenge_2_body *sc2)
{
if (!sc2)
- return;
+ return;
krb5_free_sam_challenge_2_body_contents(ctx, sc2);
free(sc2);
}
void KRB5_CALLCONV
krb5_free_sam_challenge_2_body_contents(krb5_context ctx,
- krb5_sam_challenge_2_body *sc2)
+ krb5_sam_challenge_2_body *sc2)
{
if (!sc2)
- return;
- if (sc2->sam_type_name.data)
- krb5_free_data_contents(ctx, &sc2->sam_type_name);
+ return;
+ if (sc2->sam_type_name.data)
+ krb5_free_data_contents(ctx, &sc2->sam_type_name);
if (sc2->sam_track_id.data)
- krb5_free_data_contents(ctx, &sc2->sam_track_id);
+ krb5_free_data_contents(ctx, &sc2->sam_track_id);
if (sc2->sam_challenge_label.data)
- krb5_free_data_contents(ctx, &sc2->sam_challenge_label);
+ krb5_free_data_contents(ctx, &sc2->sam_challenge_label);
if (sc2->sam_challenge.data)
- krb5_free_data_contents(ctx, &sc2->sam_challenge);
+ krb5_free_data_contents(ctx, &sc2->sam_challenge);
if (sc2->sam_response_prompt.data)
- krb5_free_data_contents(ctx, &sc2->sam_response_prompt);
+ krb5_free_data_contents(ctx, &sc2->sam_response_prompt);
if (sc2->sam_pk_for_sad.data)
- krb5_free_data_contents(ctx, &sc2->sam_pk_for_sad);
+ krb5_free_data_contents(ctx, &sc2->sam_pk_for_sad);
}
void KRB5_CALLCONV
krb5_free_sam_response(krb5_context ctx, krb5_sam_response *sr)
{
if (!sr)
- return;
+ return;
krb5_free_sam_response_contents(ctx, sr);
free(sr);
}
@@ -641,7 +642,7 @@ void KRB5_CALLCONV
krb5_free_sam_response_2(krb5_context ctx, krb5_sam_response_2 *sr2)
{
if (!sr2)
- return;
+ return;
krb5_free_sam_response_2_contents(ctx, sr2);
free(sr2);
}
@@ -650,95 +651,95 @@ void KRB5_CALLCONV
krb5_free_sam_response_contents(krb5_context ctx, krb5_sam_response *sr)
{
if (!sr)
- return;
+ return;
if (sr->sam_track_id.data)
- krb5_free_data_contents(ctx, &sr->sam_track_id);
+ krb5_free_data_contents(ctx, &sr->sam_track_id);
if (sr->sam_enc_key.ciphertext.data)
- krb5_free_data_contents(ctx, &sr->sam_enc_key.ciphertext);
+ krb5_free_data_contents(ctx, &sr->sam_enc_key.ciphertext);
if (sr->sam_enc_nonce_or_ts.ciphertext.data)
- krb5_free_data_contents(ctx, &sr->sam_enc_nonce_or_ts.ciphertext);
+ krb5_free_data_contents(ctx, &sr->sam_enc_nonce_or_ts.ciphertext);
}
void KRB5_CALLCONV
krb5_free_sam_response_2_contents(krb5_context ctx, krb5_sam_response_2 *sr2)
{
if (!sr2)
- return;
+ return;
if (sr2->sam_track_id.data)
- krb5_free_data_contents(ctx, &sr2->sam_track_id);
+ krb5_free_data_contents(ctx, &sr2->sam_track_id);
if (sr2->sam_enc_nonce_or_sad.ciphertext.data)
- krb5_free_data_contents(ctx, &sr2->sam_enc_nonce_or_sad.ciphertext);
+ krb5_free_data_contents(ctx, &sr2->sam_enc_nonce_or_sad.ciphertext);
}
void KRB5_CALLCONV
krb5_free_predicted_sam_response(krb5_context ctx,
- krb5_predicted_sam_response *psr)
+ krb5_predicted_sam_response *psr)
{
if (!psr)
- return;
+ return;
krb5_free_predicted_sam_response_contents(ctx, psr);
free(psr);
}
void KRB5_CALLCONV
krb5_free_predicted_sam_response_contents(krb5_context ctx,
- krb5_predicted_sam_response *psr)
+ krb5_predicted_sam_response *psr)
{
if (!psr)
- return;
+ return;
if (psr->sam_key.contents)
- krb5_free_keyblock_contents(ctx, &psr->sam_key);
+ krb5_free_keyblock_contents(ctx, &psr->sam_key);
krb5_free_principal(ctx, psr->client);
psr->client = 0;
if (psr->msd.data)
- krb5_free_data_contents(ctx, &psr->msd);
+ krb5_free_data_contents(ctx, &psr->msd);
}
void KRB5_CALLCONV
krb5_free_enc_sam_response_enc(krb5_context ctx,
- krb5_enc_sam_response_enc *esre)
+ krb5_enc_sam_response_enc *esre)
{
if (!esre)
- return;
+ return;
krb5_free_enc_sam_response_enc_contents(ctx, esre);
free(esre);
}
-void KRB5_CALLCONV
+void KRB5_CALLCONV
krb5_free_enc_sam_response_enc_2(krb5_context ctx,
- krb5_enc_sam_response_enc_2 *esre2)
+ krb5_enc_sam_response_enc_2 *esre2)
{
if (!esre2)
- return;
+ return;
krb5_free_enc_sam_response_enc_2_contents(ctx, esre2);
free(esre2);
}
void KRB5_CALLCONV
krb5_free_enc_sam_response_enc_contents(krb5_context ctx,
- krb5_enc_sam_response_enc *esre)
+ krb5_enc_sam_response_enc *esre)
{
if (!esre)
- return;
+ return;
if (esre->sam_sad.data)
- krb5_free_data_contents(ctx, &esre->sam_sad);
+ krb5_free_data_contents(ctx, &esre->sam_sad);
}
void KRB5_CALLCONV
krb5_free_enc_sam_response_enc_2_contents(krb5_context ctx,
- krb5_enc_sam_response_enc_2 *esre2)
+ krb5_enc_sam_response_enc_2 *esre2)
{
if (!esre2)
- return;
+ return;
if (esre2->sam_sad.data)
- krb5_free_data_contents(ctx, &esre2->sam_sad);
+ krb5_free_data_contents(ctx, &esre2->sam_sad);
}
void KRB5_CALLCONV
krb5_free_pa_enc_ts(krb5_context ctx, krb5_pa_enc_ts *pa_enc_ts)
{
if (!pa_enc_ts)
- return;
+ return;
free(pa_enc_ts);
}
@@ -746,7 +747,7 @@ void KRB5_CALLCONV
krb5_free_pa_for_user(krb5_context context, krb5_pa_for_user *req)
{
if (req == NULL)
- return;
+ return;
krb5_free_principal(context, req->user);
req->user = NULL;
krb5_free_checksum_contents(context, &req->cksum);
@@ -758,7 +759,7 @@ void KRB5_CALLCONV
krb5_free_s4u_userid_contents(krb5_context context, krb5_s4u_userid *user_id)
{
if (user_id == NULL)
- return;
+ return;
user_id->nonce = 0;
krb5_free_principal(context, user_id->user);
user_id->user = NULL;
@@ -772,7 +773,7 @@ void KRB5_CALLCONV
krb5_free_pa_s4u_x509_user(krb5_context context, krb5_pa_s4u_x509_user *req)
{
if (req == NULL)
- return;
+ return;
krb5_free_s4u_userid_contents(context, &req->user_id);
krb5_free_checksum_contents(context, &req->cksum);
free(req);
@@ -780,26 +781,26 @@ krb5_free_pa_s4u_x509_user(krb5_context context, krb5_pa_s4u_x509_user *req)
void KRB5_CALLCONV
krb5_free_pa_server_referral_data(krb5_context context,
- krb5_pa_server_referral_data *ref)
+ krb5_pa_server_referral_data *ref)
{
if (ref == NULL)
- return;
+ return;
krb5_free_data(context, ref->referred_realm);
ref->referred_realm = NULL;
krb5_free_principal(context, ref->true_principal_name);
ref->true_principal_name = NULL;
krb5_free_principal(context, ref->requested_principal_name);
ref->requested_principal_name = NULL;
- krb5_free_checksum_contents(context, &ref->rep_cksum);
+ krb5_free_checksum_contents(context, &ref->rep_cksum);
free(ref);
}
void KRB5_CALLCONV
krb5_free_pa_svr_referral_data(krb5_context context,
- krb5_pa_svr_referral_data *ref)
+ krb5_pa_svr_referral_data *ref)
{
if (ref == NULL)
- return;
+ return;
krb5_free_principal(context, ref->principal);
ref->principal = NULL;
free(ref);
@@ -807,79 +808,79 @@ krb5_free_pa_svr_referral_data(krb5_context context,
void KRB5_CALLCONV
krb5_free_pa_pac_req(krb5_context context,
- krb5_pa_pac_req *req)
+ krb5_pa_pac_req *req)
{
free(req);
}
void KRB5_CALLCONV
krb5_free_etype_list(krb5_context context,
- krb5_etype_list *etypes)
+ krb5_etype_list *etypes)
{
if (etypes != NULL) {
- free(etypes->etypes);
- free(etypes);
+ free(etypes->etypes);
+ free(etypes);
}
}
void krb5_free_fast_req(krb5_context context, krb5_fast_req *val)
{
- if (val == NULL)
- return;
- krb5_free_kdc_req(context, val->req_body);
- free(val);
+ if (val == NULL)
+ return;
+ krb5_free_kdc_req(context, val->req_body);
+ free(val);
}
void krb5_free_fast_armor(krb5_context context, krb5_fast_armor *val)
{
- if (val == NULL)
- return;
- krb5_free_data_contents(context, &val->armor_value);
- free(val);
+ if (val == NULL)
+ return;
+ krb5_free_data_contents(context, &val->armor_value);
+ free(val);
}
void krb5_free_fast_response(krb5_context context, krb5_fast_response *val)
{
- if (!val)
- return;
- krb5_free_pa_data(context, val->padata);
- krb5_free_fast_finished(context, val->finished);
- krb5_free_keyblock(context, val->strengthen_key);
- free(val);
+ if (!val)
+ return;
+ krb5_free_pa_data(context, val->padata);
+ krb5_free_fast_finished(context, val->finished);
+ krb5_free_keyblock(context, val->strengthen_key);
+ free(val);
}
void krb5_free_fast_finished
(krb5_context context, krb5_fast_finished *val)
{
- if (!val)
- return;
- krb5_free_principal(context, val->client);
- krb5_free_checksum_contents(context, &val->ticket_checksum);
- free(val);
+ if (!val)
+ return;
+ krb5_free_principal(context, val->client);
+ krb5_free_checksum_contents(context, &val->ticket_checksum);
+ free(val);
}
void krb5_free_typed_data(krb5_context context, krb5_typed_data **in)
{
- int i = 0;
- if (in == NULL) return;
- while (in[i] != NULL) {
- if (in[i]->data != NULL)
- free(in[i]->data);
- free(in[i]);
- i++;
- }
- free(in);
+ int i = 0;
+ if (in == NULL) return;
+ while (in[i] != NULL) {
+ if (in[i]->data != NULL)
+ free(in[i]->data);
+ free(in[i]);
+ i++;
+ }
+ free(in);
}
void krb5_free_fast_armored_req(krb5_context context,
- krb5_fast_armored_req *val)
+ krb5_fast_armored_req *val)
{
if (val == NULL)
- return;
+ return;
if (val->armor)
- krb5_free_fast_armor(context, val->armor);
+ krb5_free_fast_armor(context, val->armor);
krb5_free_data_contents(context, &val->enc_part.ciphertext);
if (val->req_checksum.contents)
- krb5_free_checksum_contents(context, &val->req_checksum);
+ krb5_free_checksum_contents(context, &val->req_checksum);
free(val);
}
@@ -908,4 +909,3 @@ krb5_free_ad_kdcissued(krb5_context context, krb5_ad_kdcissued *val)
krb5_free_authdata(context, val->elements);
free(val);
}
-