Change usage of xfree to krb5_xfree to prevent namespace pollution
authorTheodore Tso <tytso@mit.edu>
Fri, 15 Oct 1993 16:20:13 +0000 (16:20 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 15 Oct 1993 16:20:13 +0000 (16:20 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2667 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/do_as_req.c
src/kdc/do_tgs_req.c
src/kdc/kdc_util.c
src/kdc/kerberos_v4.c
src/kdc/replay.c

index 6cf372d227fe800d6afbe1a7de1e444ecfbca9d3..44289e4445c845d6b891708ac57ade761ed6f8df 100644 (file)
@@ -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... */
index 0b41637d8ca3ac4e480b952ff42edab937c0cd9b..b08c56ffc5f7f64fd246c06a7af9a60a7ac045ba 100644 (file)
@@ -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";
index f119ed9995c58121d1b05ca94d9a6817228046c2..e7b3d030b95f17a4a187bc2d2dca1328c8f0e012 100644 (file)
@@ -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;
 
index 7a96b1661a8486f9703e5d348537f030800e4a4f..2e5e3e7b8f57d91308faf69b1a63bd93b803cf13 100644 (file)
@@ -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
index 3e7cc03ae84b8d4f9ef333ea07b2855f14909a60..c0e8c8597c15958ade01cf2cfe2a622abcd3f9a3 100644 (file)
@@ -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;