From 3fb9620819d685c72a9ecd9c4eec8b5fa957ba1a Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 15 Oct 1993 16:20:13 +0000 Subject: [PATCH] Change usage of xfree to krb5_xfree to prevent namespace pollution git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2667 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/do_as_req.c | 10 +++++----- src/kdc/do_tgs_req.c | 2 +- src/kdc/kdc_util.c | 8 ++++---- src/kdc/kerberos_v4.c | 2 +- src/kdc/replay.c | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 6cf372d22..44289e444 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -90,7 +90,7 @@ check_padata (client, src_addr, padata, pa_id, flags) retval = krb5_verify_padata(*padata,client->principal,src_addr, &tmpkey, pa_id, flags); memset((char *)tmpkey.contents, 0, tmpkey.length); - xfree(tmpkey.contents); + krb5_xfree(tmpkey.contents); if (retval && client->alt_key.length) { /* * If we failed, try again with the alternative key @@ -104,7 +104,7 @@ check_padata (client, src_addr, padata, pa_id, flags) retval = krb5_verify_padata(*padata,client->principal,src_addr, &tmpkey, pa_id, flags); memset((char *)tmpkey.contents, 0, tmpkey.length); - xfree(tmpkey.contents); + krb5_xfree(tmpkey.contents); } return retval; } @@ -411,7 +411,7 @@ ticket_reply.enc_part2 = &enc_tkt_reply; } retval = krb5_encrypt_tkt_part(&encrypting_key, &ticket_reply); memset((char *)encrypting_key.contents, 0, encrypting_key.length); - xfree(encrypting_key.contents); + krb5_xfree(encrypting_key.contents); if (retval) { cleanup(); return retval; @@ -476,7 +476,7 @@ ticket_reply.enc_part2 = &enc_tkt_reply; free(ticket_reply.enc_part.ciphertext.data); \ free(cname); free(sname); \ if (client.salt_type == KRB5_KDB_SALTTYPE_NOREALM) \ - xfree(padat_tmp[0]->contents);} + krb5_xfree(padat_tmp[0]->contents);} reply.client = request->client; /* XXX need separate etypes for ticket encryption and kdc_rep encryption */ @@ -513,7 +513,7 @@ ticket_reply.enc_part2 = &enc_tkt_reply; retval = krb5_encode_kdc_rep(KRB5_AS_REP, &reply_encpart, &encrypting_key, &reply, response); memset((char *)encrypting_key.contents, 0, encrypting_key.length); - xfree(encrypting_key.contents); + krb5_xfree(encrypting_key.contents); cleanup(); /* these parts are left on as a courtesy from krb5_encode_kdc_rep so we can use them in raw form if needed. But, we don't... */ diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index 0b41637d8..b08c56ffc 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -506,7 +506,7 @@ tgt_again: retval = krb5_encrypt_tkt_part(&encrypting_key, &ticket_reply); memset((char *)encrypting_key.contents, 0, encrypting_key.length); - xfree(encrypting_key.contents); + krb5_xfree(encrypting_key.contents); if (retval) { status = "TKT_ENCRYPT"; diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c index f119ed999..e7b3d030b 100644 --- a/src/kdc/kdc_util.c +++ b/src/kdc/kdc_util.c @@ -79,7 +79,7 @@ krb5_authdata ***output; *retdata[i] = **ptr; if (!(retdata[i]->contents = (krb5_octet *)malloc(retdata[i]->length))) { - xfree(retdata[i]); + krb5_xfree(retdata[i]); retdata[i] = 0; krb5_free_authdata(retdata); return ENOMEM; @@ -281,7 +281,7 @@ krb5_tkt_authent **ret_authdat; * no longer need to protect the ticket in apreq, since * authdat is about to get nuked --- it's going to get reassigned. */ - xfree(authdat); + krb5_xfree(authdat); authdat = nauthdat; *ret_authdat = authdat; @@ -342,7 +342,7 @@ krb5_tkt_authent **ret_authdat; &our_cksum); } - xfree(our_cksum.contents); + krb5_xfree(our_cksum.contents); cleanup: if (apreq) @@ -547,7 +547,7 @@ krb5_principal server; if(!trans) return(ENOMEM); - if(new_trans->data) xfree(new_trans->data); + if(new_trans->data) krb5_xfree(new_trans->data); new_trans->data = trans; diff --git a/src/kdc/kerberos_v4.c b/src/kdc/kerberos_v4.c index 7a96b1661..2e5e3e7b8 100644 --- a/src/kdc/kerberos_v4.c +++ b/src/kdc/kerberos_v4.c @@ -567,7 +567,7 @@ compat_decrypt_key (in5, out4) bcopy( out5.contents, out4, out5.length); } bzero( out5.contents, out5.length); - xfree( out5.contents); + krb5_xfree( out5.contents); return( retval); } /* array of name-components + NULL ptr diff --git a/src/kdc/replay.c b/src/kdc/replay.c index 3e7cc03ae..c0e8c8597 100644 --- a/src/kdc/replay.c +++ b/src/kdc/replay.c @@ -104,7 +104,7 @@ register krb5_data **outpkt; hold = eptr; last->next = eptr->next; eptr = last; - xfree(hold); + krb5_xfree(hold); } else { /* this isn't it, just move along */ last = eptr; @@ -134,12 +134,12 @@ register krb5_data *outpkt; return; eptr->timein = timenow; if (krb5_copy_data(inpkt, &eptr->req_packet)) { - xfree(eptr); + krb5_xfree(eptr); return; } if (krb5_copy_data(outpkt, &eptr->reply_packet)) { krb5_free_data(eptr->req_packet); - xfree(eptr); + krb5_xfree(eptr); return; } eptr->next = root_ptr.next; -- 2.26.2