svn rev #21812: trunk/src/ kadmin/dbutil/ kadmin/ktutil/ kadmin/server/ lib/crypto/ ...

raeburn@MIT.EDU raeburn at MIT.EDU
Tue Jan 27 19:04:34 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=21812
Commit By: raeburn
Log Message:
Start to phase out krb5_xfree macro, which just casts its argument to
char* and calls free.

Replace most uses, outside of the LDAP KDB plugin, which doesn't build
on my test system of the moment because of version dependencies.  Add
one explicit cast to make the change warning-neutral (under gcc 4.0.1
on Mac OS X 10.5.6).



Changed Files:
U   trunk/src/kadmin/dbutil/dump.c
U   trunk/src/kadmin/ktutil/ktutil.c
U   trunk/src/kadmin/server/schpw.c
U   trunk/src/lib/crypto/des/afsstring2key.c
U   trunk/src/lib/crypto/keyblocks.c
U   trunk/src/lib/crypto/keyed_checksum_types.c
U   trunk/src/lib/kadm5/alt_prof.c
U   trunk/src/lib/kadm5/str_conv.c
U   trunk/src/lib/kdb/decrypt_key.c
U   trunk/src/lib/kdb/encrypt_key.c
U   trunk/src/lib/kdb/kdb5.c
U   trunk/src/lib/kdb/kdb_cpw.c
U   trunk/src/lib/kdb/kdb_default.c
U   trunk/src/lib/kdb/keytab.c
U   trunk/src/lib/krb5/ccache/cc_file.c
U   trunk/src/lib/krb5/ccache/cc_keyring.c
U   trunk/src/lib/krb5/ccache/cc_memory.c
U   trunk/src/lib/krb5/ccache/cc_mslsa.c
U   trunk/src/lib/krb5/keytab/kt_file.c
U   trunk/src/lib/krb5/keytab/kt_memory.c
U   trunk/src/lib/krb5/keytab/kt_srvtab.c
U   trunk/src/lib/krb5/keytab/ktfr_entry.c
U   trunk/src/lib/krb5/krb/auth_con.c
U   trunk/src/lib/krb5/krb/bld_pr_ext.c
U   trunk/src/lib/krb5/krb/bld_princ.c
U   trunk/src/lib/krb5/krb/chpw.c
U   trunk/src/lib/krb5/krb/conv_princ.c
U   trunk/src/lib/krb5/krb/copy_addrs.c
U   trunk/src/lib/krb5/krb/copy_athctr.c
U   trunk/src/lib/krb5/krb/copy_auth.c
U   trunk/src/lib/krb5/krb/copy_cksum.c
U   trunk/src/lib/krb5/krb/copy_creds.c
U   trunk/src/lib/krb5/krb/copy_data.c
U   trunk/src/lib/krb5/krb/copy_key.c
U   trunk/src/lib/krb5/krb/copy_tick.c
U   trunk/src/lib/krb5/krb/free_rtree.c
U   trunk/src/lib/krb5/krb/fwd_tgt.c
U   trunk/src/lib/krb5/krb/gc_via_tkt.c
U   trunk/src/lib/krb5/krb/gen_subkey.c
U   trunk/src/lib/krb5/krb/get_creds.c
U   trunk/src/lib/krb5/krb/get_in_tkt.c
U   trunk/src/lib/krb5/krb/gic_keytab.c
U   trunk/src/lib/krb5/krb/gic_pwd.c
U   trunk/src/lib/krb5/krb/kfree.c
U   trunk/src/lib/krb5/krb/mk_cred.c
U   trunk/src/lib/krb5/krb/mk_error.c
U   trunk/src/lib/krb5/krb/mk_priv.c
U   trunk/src/lib/krb5/krb/mk_rep.c
U   trunk/src/lib/krb5/krb/mk_req_ext.c
U   trunk/src/lib/krb5/krb/mk_safe.c
U   trunk/src/lib/krb5/krb/parse.c
U   trunk/src/lib/krb5/krb/preauth.c
U   trunk/src/lib/krb5/krb/preauth2.c
U   trunk/src/lib/krb5/krb/rd_cred.c
U   trunk/src/lib/krb5/krb/rd_priv.c
U   trunk/src/lib/krb5/krb/rd_req_dec.c
U   trunk/src/lib/krb5/krb/rd_safe.c
U   trunk/src/lib/krb5/krb/recvauth.c
U   trunk/src/lib/krb5/krb/send_tgs.c
U   trunk/src/lib/krb5/krb/sendauth.c
U   trunk/src/lib/krb5/krb/ser_princ.c
U   trunk/src/lib/krb5/krb/serialize.c
U   trunk/src/lib/krb5/krb/set_realm.c
U   trunk/src/lib/krb5/krb/srv_rcache.c
U   trunk/src/lib/krb5/krb/t_ser.c
U   trunk/src/lib/krb5/krb/vfy_increds.c
U   trunk/src/lib/krb5/os/an_to_ln.c
U   trunk/src/lib/krb5/os/free_krbhs.c
U   trunk/src/lib/krb5/os/full_ipadr.c
U   trunk/src/lib/krb5/os/localaddr.c
U   trunk/src/lib/krb5/os/locate_kdc.c
U   trunk/src/lib/krb5/os/read_msg.c
U   trunk/src/lib/krb5/os/sn2princ.c
U   trunk/src/lib/krb5/rcache/rc_dfl.c
U   trunk/src/tests/asn.1/krb5_decode_test.c
Modified: trunk/src/kadmin/dbutil/dump.c
===================================================================
--- trunk/src/kadmin/dbutil/dump.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/kadmin/dbutil/dump.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -585,8 +585,8 @@
 	     krb5_dbe_lookup_last_pwd_change(arg->kcontext, entry,
 					     &last_pwd_change))) {
 	    fprintf(stderr, nokeys_err, arg->programname, name);
-	    krb5_xfree(mod_name);
-	    krb5_xfree(name);
+	    free(mod_name);
+	    free(name);
 	    return(retval);
 	}
 
@@ -602,8 +602,8 @@
 				   KRB5_KDB_SALTTYPE_V4,
 				   &akey))) {
 	    fprintf(stderr, nokeys_err, arg->programname, name);
-	    krb5_xfree(mod_name);
-	    krb5_xfree(name);
+	    free(mod_name);
+	    free(name);
 	    return(retval);
 	}
 
@@ -668,9 +668,9 @@
 	/* If we're blabbing, do it */
 	if (arg->verbose)
 	    fprintf(stderr, "%s\n", name);
-	krb5_xfree(mod_name);
+	free(mod_name);
     }
-    krb5_xfree(name);
+    free(name);
     return(0);
 }
 
@@ -845,7 +845,7 @@
 	    retval = EINVAL;
 	}
     }
-    krb5_xfree(name);
+    free(name);
     return(retval);
 }
 

Modified: trunk/src/kadmin/ktutil/ktutil.c
===================================================================
--- trunk/src/kadmin/ktutil/ktutil.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/kadmin/ktutil/ktutil.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -265,7 +265,7 @@
 	    printf(")");
 	}
 	printf("\n");
-	krb5_xfree(pname);
+	free(pname);
     }
 }
 

Modified: trunk/src/kadmin/server/schpw.c
===================================================================
--- trunk/src/kadmin/server/schpw.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/kadmin/server/schpw.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -251,7 +251,7 @@
     /* zap the password */
     memset(clear.data, 0, clear.length);
     memset(ptr, 0, clear.length);
-    krb5_xfree(clear.data);
+    free(clear.data);
     free(ptr);
     clear.length = 0;
 
@@ -378,7 +378,7 @@
            reply */
 
 	if (ap_rep.length) {
-	    krb5_xfree(ap_rep.data);
+	    free(ap_rep.data);
 	    ap_rep.length = 0;
 	}
 
@@ -457,13 +457,13 @@
     if (changepw)
 	krb5_free_principal(context, changepw);
     if (ap_rep.length)
-	krb5_xfree(ap_rep.data);
+	free(ap_rep.data);
     if (ticket)
 	krb5_free_ticket(context, ticket);
     if (clear.length)
-	krb5_xfree(clear.data);
+	free(clear.data);
     if (cipher.length)
-	krb5_xfree(cipher.data);
+	free(cipher.data);
     if (target)
 	krb5_free_principal(context, target);
     if (targetstr)

Modified: trunk/src/lib/crypto/des/afsstring2key.c
===================================================================
--- trunk/src/lib/crypto/des/afsstring2key.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/crypto/des/afsstring2key.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -149,11 +149,11 @@
       
       /* clean & free the input string */
       memset(password, 0, (size_t) pw_len);
-      krb5_xfree(password);
+      free(password);
     }
 #if 0
     /* must free here because it was copied for this special case */
-    krb5_xfree(salt->data);
+    free(salt->data);
 #endif
     return 0;
 }

Modified: trunk/src/lib/crypto/keyblocks.c
===================================================================
--- trunk/src/lib/crypto/keyblocks.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/crypto/keyblocks.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -65,7 +65,7 @@
 krb5int_c_free_keyblock(krb5_context context, register krb5_keyblock *val)
 {
     krb5int_c_free_keyblock_contents(context, val);
-    krb5_xfree(val);
+    free(val);
 }
 
 void 
@@ -73,7 +73,7 @@
 {
      if (key->contents) {
        krb5int_zap_data (key->contents, key->length);
-	  krb5_xfree(key->contents);
+	  free(key->contents);
 	  key->contents = 0;
      }
 }

Modified: trunk/src/lib/crypto/keyed_checksum_types.c
===================================================================
--- trunk/src/lib/crypto/keyed_checksum_types.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/crypto/keyed_checksum_types.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -83,7 +83,7 @@
 krb5_free_cksumtypes(krb5_context context, krb5_cksumtype *val)
 {
     if (val)
-	krb5_xfree(val);
+	free(val);
     return;
 }
 

Modified: trunk/src/lib/kadm5/alt_prof.c
===================================================================
--- trunk/src/lib/kadm5/alt_prof.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/kadm5/alt_prof.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -639,7 +639,7 @@
                !krb5_aprof_get_string(aprofile, hierarchy, TRUE, &svalue)) {
          if (!krb5_string_to_enctype(svalue, &params.enctype)) {
               params.mask |= KADM5_CONFIG_ENCTYPE;
-              krb5_xfree(svalue);
+              free(svalue);
          }
     } else {
          params.mask |= KADM5_CONFIG_ENCTYPE;
@@ -678,7 +678,7 @@
                !krb5_aprof_get_string(aprofile, hierarchy, TRUE, &svalue)) {
          if (!krb5_string_to_timestamp(svalue, &params.expiration)) {
               params.mask |= KADM5_CONFIG_EXPIRATION;
-              krb5_xfree(svalue);
+              free(svalue);
          }
     } else {
          params.mask |= KADM5_CONFIG_EXPIRATION;
@@ -721,7 +721,7 @@
          }
          if (!sp)
               params.mask |= KADM5_CONFIG_FLAGS;
-         krb5_xfree(svalue);
+         free(svalue);
     } else {
          params.mask |= KADM5_CONFIG_FLAGS;
          params.flags = KRB5_KDB_DEF_FLAGS;
@@ -761,7 +761,7 @@
          if (params.num_keysalts)
               params.mask |= KADM5_CONFIG_ENCTYPES;
 
-         krb5_xfree(svalue);
+         free(svalue);
     }
     
         hierarchy[2] = "iprop_enable";
@@ -991,7 +991,7 @@
     if (!krb5_aprof_get_string(aprofile, hierarchy, TRUE, &svalue)) {
         if (!krb5_string_to_enctype(svalue, &rparams->realm_enctype))
             rparams->realm_enctype_valid = 1;
-        krb5_xfree(svalue);
+        free(svalue);
     }
             
     /* Get the value for the stashfile */
@@ -1019,7 +1019,7 @@
         if (!krb5_string_to_timestamp(svalue,
                                       &rparams->realm_expiration))
             rparams->realm_expiration_valid = 1;
-        krb5_xfree(svalue);
+        free(svalue);
     }
 
     hierarchy[2] = "reject_bad_transit";
@@ -1080,7 +1080,7 @@
         }
         if (!sp)
             rparams->realm_flags_valid = 1;
-        krb5_xfree(svalue);
+        free(svalue);
     }
 
     rparams->realm_keysalts = NULL;
@@ -1108,17 +1108,17 @@
     krb5_realm_params        *rparams;
 {
     if (rparams) {
-        krb5_xfree(rparams->realm_profile);
-        krb5_xfree(rparams->realm_dbname);
-        krb5_xfree(rparams->realm_mkey_name);
-        krb5_xfree(rparams->realm_stash_file);
-        krb5_xfree(rparams->realm_keysalts);
-        krb5_xfree(rparams->realm_kdc_ports);
-        krb5_xfree(rparams->realm_kdc_tcp_ports);
-        krb5_xfree(rparams->realm_acl_file);
-        krb5_xfree(rparams->realm_no_host_referral);
-        krb5_xfree(rparams->realm_host_based_services);
-        krb5_xfree(rparams);
+        free(rparams->realm_profile);
+        free(rparams->realm_dbname);
+        free(rparams->realm_mkey_name);
+        free(rparams->realm_stash_file);
+        free(rparams->realm_keysalts);
+        free(rparams->realm_kdc_ports);
+        free(rparams->realm_kdc_tcp_ports);
+        free(rparams->realm_acl_file);
+        free(rparams->realm_no_host_referral);
+        free(rparams->realm_host_based_services);
+        free(rparams);
     }
     return(0);
 }

Modified: trunk/src/lib/kadm5/str_conv.c
===================================================================
--- trunk/src/lib/kadm5/str_conv.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/kadm5/str_conv.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -327,7 +327,7 @@
 		if (savep) {
 		    memcpy(*ksaltp, savep,
 			   len * sizeof(krb5_key_salt_tuple));
-		    krb5_xfree(savep);
+		    free(savep);
 		}
 
 		/* Save our values */

Modified: trunk/src/lib/kdb/decrypt_key.c
===================================================================
--- trunk/src/lib/kdb/decrypt_key.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/kdb/decrypt_key.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -90,7 +90,7 @@
 
 	if ((retval = krb5_c_decrypt(context, mkey, 0 /* XXX */, 0,
 				     &cipher, &plain))) {
-	    krb5_xfree(plain.data);
+	    free(plain.data);
 	    return retval;
 	}
 
@@ -101,7 +101,7 @@
 	   any better than that. */
 
 	if (tmplen > plain.length) {
-	    krb5_xfree(plain.data);
+	    free(plain.data);
 	    return(KRB5_CRYPTO_INTERNAL);
 	}
 
@@ -118,7 +118,7 @@
 	    if ((keysalt->data.length = key_data->key_data_length[1])) {
 		if (!(keysalt->data.data=(char *)malloc(keysalt->data.length))){
 		    if (key_data->key_data_contents[0]) {
-			krb5_xfree(dbkey->contents);
+			free(dbkey->contents);
 			dbkey->contents = 0;
 			dbkey->length = 0;
 		    }

Modified: trunk/src/lib/kdb/encrypt_key.c
===================================================================
--- trunk/src/lib/kdb/encrypt_key.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/kdb/encrypt_key.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -79,7 +79,7 @@
 
     for (i = 0; i < key_data->key_data_ver; i++)
 	if (key_data->key_data_contents[i])
-	    krb5_xfree(key_data->key_data_contents[i]);
+	    free(key_data->key_data_contents[i]);
 
     key_data->key_data_ver = 1;
     key_data->key_data_kvno = keyver;
@@ -110,7 +110,7 @@
 
     if ((retval = krb5_c_encrypt(context, mkey, /* XXX */ 0, 0,
 				 &plain, &cipher))) {
-	krb5_xfree(key_data->key_data_contents[0]);
+	free(key_data->key_data_contents[0]);
 	return retval;
     }
 
@@ -123,7 +123,7 @@
 		key_data->key_data_contents[1] =
 		    (krb5_octet *)malloc(keysalt->data.length);
 		if (key_data->key_data_contents[1] == NULL) {
-		    krb5_xfree(key_data->key_data_contents[0]);
+		    free(key_data->key_data_contents[0]);
 		    return ENOMEM;
 		}
 		memcpy(key_data->key_data_contents[1], keysalt->data.data,

Modified: trunk/src/lib/kdb/kdb5.c
===================================================================
--- trunk/src/lib/kdb/kdb5.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/kdb/kdb5.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -1533,7 +1533,7 @@
         }
 
 	if (!salt)
-	    krb5_xfree(scratch.data);
+	    free(scratch.data);
 	memset(password, 0, sizeof(password));	/* erase it */
 
     } else {

Modified: trunk/src/lib/kdb/kdb_cpw.c
===================================================================
--- trunk/src/lib/kdb/kdb_cpw.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/kdb/kdb_cpw.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -412,7 +412,7 @@
 	 	return(retval);
 
 	    key_salt.data = *saltdata;
-	    krb5_xfree(saltdata);
+	    free(saltdata);
 	}
 		break;
     	case KRB5_KDB_SALTTYPE_NOREALM:
@@ -438,7 +438,7 @@
 
 	    key_salt.data = *saltdata;
 	    key_salt.data.length = SALT_TYPE_AFS_LENGTH; /*length actually used below...*/
-	    krb5_xfree(saltdata);
+	    free(saltdata);
 #else
 	    /* Why do we do this? Well, the afs_mit_string_to_key needs to
 	       use strlen, and the realm is not NULL terminated.... */
@@ -481,7 +481,7 @@
 					     kvno, &tmp_key_data);
 	if (key_salt.data.data)
 	    free(key_salt.data.data);
-	krb5_xfree(key.contents);
+	free(key.contents);
 
 	if( retval )
 	    return retval;

Modified: trunk/src/lib/kdb/kdb_default.c
===================================================================
--- trunk/src/lib/kdb/kdb_default.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/kdb/kdb_default.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -469,7 +469,7 @@
     }
 
     memset((char *)tempkey.contents, 0, tempkey.length);
-    krb5_xfree(tempkey.contents);
+    free(tempkey.contents);
     krb5_db_free_principal(context, &master_entry, nprinc);
     
     return retval;

Modified: trunk/src/lib/kdb/keytab.c
===================================================================
--- trunk/src/lib/kdb/keytab.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/kdb/keytab.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -92,7 +92,7 @@
    */
 
   kt->ops = NULL;
-  krb5_xfree(kt);
+  free(kt);
 
   return 0;
 }

Modified: trunk/src/lib/krb5/ccache/cc_file.c
===================================================================
--- trunk/src/lib/krb5/ccache/cc_file.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/ccache/cc_file.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -530,7 +530,7 @@
  errout:
     while(--i >= 0)
 	free(krb5_princ_component(context, tmpprinc, i)->data);
-    krb5_xfree(krb5_princ_realm(context, tmpprinc)->data);
+    free(krb5_princ_realm(context, tmpprinc)->data);
     free((char *)tmpprinc->data);
     free((char *)tmpprinc);
     return kret;
@@ -628,7 +628,7 @@
      return KRB5_OK;
  errout:
      if (keyblock->contents) {
-	 krb5_xfree(keyblock->contents);
+	 free(keyblock->contents);
 	 keyblock->contents = NULL;
      }
      return kret;
@@ -669,7 +669,7 @@
      return KRB5_OK;
  errout:
      if (data->data) {
-	 krb5_xfree(data->data);
+	 free(data->data);
 	 data->data = NULL;
      }
      return kret;
@@ -714,7 +714,7 @@
      return KRB5_OK;
  errout:
      if (addr->contents) {
-	 krb5_xfree(addr->contents);
+	 free(addr->contents);
 	 addr->contents = NULL;
      }
      return kret;
@@ -898,7 +898,7 @@
      return KRB5_OK;
  errout:
      if (a->contents) {
-	 krb5_xfree(a->contents);
+	 free(a->contents);
 	 a->contents = NULL;
      }
      return kret;
@@ -1541,7 +1541,7 @@
 krb5_fcc_close(krb5_context context, krb5_ccache id)
 {
      dereference(context, (krb5_fcc_data *) id->data);
-     krb5_xfree(id);
+     free(id);
      return KRB5_OK;
 }
 
@@ -1676,7 +1676,7 @@
   cleanup:
      k5_cc_mutex_unlock(context, &data->lock);
      dereference(context, data);
-     krb5_xfree(id);
+     free(id);
 
      krb5_change_cache ();
      return kret;
@@ -1828,7 +1828,7 @@
      if (OPENCLOSE(id)) {
           kret = krb5_fcc_open_file(context, id, FCC_OPEN_RDONLY);
           if (kret) {
-              krb5_xfree(fcursor);
+              free(fcursor);
 	      k5_cc_mutex_unlock(context, &data->lock);
               return kret;
           }
@@ -1837,12 +1837,12 @@
      /* Make sure we start reading right after the primary principal */
      kret = krb5_fcc_skip_header(context, id);
      if (kret) {
-         krb5_xfree(fcursor);
+         free(fcursor);
 	 goto done;
      }
      kret = krb5_fcc_skip_principal(context, id);
      if (kret) {
-         krb5_xfree(fcursor);
+         free(fcursor);
 	 goto done;
      }
 
@@ -1959,7 +1959,7 @@
         and if not, fcc_start_seq_get and/or fcc_next_cred will do the
         MAYBE_CLOSE.
      MAYBE_CLOSE(context, id, kret); */
-     krb5_xfree((krb5_fcc_cursor *) *cursor);
+     free((krb5_fcc_cursor *) *cursor);
      return 0;
 }
 

Modified: trunk/src/lib/krb5/ccache/cc_keyring.c
===================================================================
--- trunk/src/lib/krb5/ccache/cc_keyring.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/ccache/cc_keyring.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -427,11 +427,11 @@
 
     d = (krb5_krcc_data *) id->data;
 
-    krb5_xfree(d->name);
+    free(d->name);
     k5_cc_mutex_destroy(&d->lock);
-    krb5_xfree(d);
+    free(d);
 
-    krb5_xfree(id);
+    free(id);
 
     return KRB5_OK;
 }
@@ -498,7 +498,7 @@
 	return kret;
 
     krb5_krcc_clearcache(context, id);
-    krb5_xfree(d->name);
+    free(d->name);
     res = keyctl_unlink(d->ring_id, d->parent_id);
     if (res < 0) {
 	kret = errno;
@@ -509,8 +509,8 @@
 cleanup:
     k5_cc_mutex_unlock(context, &d->lock);
     k5_cc_mutex_destroy(&d->lock);
-    krb5_xfree(d);
-    krb5_xfree(id);
+    free(d);
+    free(id);
 
     krb5_change_cache();
 
@@ -811,14 +811,14 @@
 
     kret = k5_cc_mutex_init(&d->lock);
     if (kret) {
-	krb5_xfree(d);
+	free(d);
 	return kret;
     }
 
     d->name = strdup(name);
     if (d->name == NULL) {
 	k5_cc_mutex_destroy(&d->lock);
-	krb5_xfree(d);
+	free(d);
 	return KRB5_CC_NOMEM;
     }
     d->princ_id = 0;
@@ -917,7 +917,7 @@
     kret = krb5_krcc_new_data(uniquename, key, ring_id, &d);
     k5_cc_mutex_unlock(context, &krb5int_krcc_mutex);
     if (kret) {
-	krb5_xfree(lid);
+	free(lid);
 	return kret;
     }
     lid->data = d;
@@ -1339,13 +1339,13 @@
 
   cleanticket:
     memset(creds->ticket.data, 0, (unsigned) creds->ticket.length);
-    krb5_xfree(creds->ticket.data);
+    free(creds->ticket.data);
   cleanauthdata:
     krb5_free_authdata(context, creds->authdata);
   cleanaddrs:
     krb5_free_addresses(context, creds->addresses);
   cleanblock:
-    krb5_xfree(creds->keyblock.contents);
+    free(creds->keyblock.contents);
   cleanserver:
     krb5_free_principal(context, creds->server);
   cleanclient:
@@ -1414,7 +1414,7 @@
   errout:
     while (--i >= 0)
 	free(krb5_princ_component(context, tmpprinc, i)->data);
-    krb5_xfree(krb5_princ_realm(context, tmpprinc)->data);
+    free(krb5_princ_realm(context, tmpprinc)->data);
     free((char *) tmpprinc->data);
     free((char *) tmpprinc);
     return kret;
@@ -1456,7 +1456,7 @@
     return KRB5_OK;
   errout:
     if (keyblock->contents)
-	krb5_xfree(keyblock->contents);
+	free(keyblock->contents);
     return kret;
 }
 
@@ -1523,7 +1523,7 @@
     return KRB5_OK;
   errout:
     if (data->data)
-	krb5_xfree(data->data);
+	free(data->data);
     return kret;
 }
 
@@ -1632,7 +1632,7 @@
     return KRB5_OK;
   errout:
     if (addr->contents)
-	krb5_xfree(addr->contents);
+	free(addr->contents);
     return kret;
 }
 
@@ -1725,7 +1725,7 @@
     return KRB5_OK;
   errout:
     if (a->contents)
-	krb5_xfree(a->contents);
+	free(a->contents);
     return kret;
 
 }

Modified: trunk/src/lib/krb5/ccache/cc_memory.c
===================================================================
--- trunk/src/lib/krb5/ccache/cc_memory.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/ccache/cc_memory.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -179,7 +179,7 @@
 krb5_error_code KRB5_CALLCONV
 krb5_mcc_close(krb5_context context, krb5_ccache id)
 {
-     krb5_xfree(id);
+     free(id);
      return KRB5_OK;
 }
 
@@ -193,7 +193,7 @@
     for (curr = d->link; curr;) {
 	krb5_free_creds(context, curr->creds);
 	next = curr->next;
-	krb5_xfree(curr);
+	free(curr);
 	curr = next;
     }
     d->link = NULL;
@@ -234,11 +234,11 @@
         return err;
 
     krb5_mcc_free(context, id);
-    krb5_xfree(d->name);
+    free(d->name);
     k5_cc_mutex_unlock(context, &d->lock);
     k5_cc_mutex_destroy(&d->lock);
-    krb5_xfree(d); 
-    krb5_xfree(id);
+    free(d); 
+    free(id);
 
     krb5_change_cache ();
     return KRB5_OK;
@@ -411,14 +411,14 @@
         
     err = k5_cc_mutex_init(&d->lock);
     if (err) {
-	krb5_xfree(d);
+	free(d);
 	return err;
     }
 
     d->name = strdup(name);
     if (d->name == NULL) {
 	k5_cc_mutex_destroy(&d->lock);
-	krb5_xfree(d);
+	free(d);
 	return KRB5_CC_NOMEM;
     }
     d->link = NULL;
@@ -501,7 +501,7 @@
 
     k5_cc_mutex_unlock(context, &krb5int_mcc_mutex);
     if (err) {
-	krb5_xfree(lid);
+	free(lid);
 	return err;
     }
     lid->data = d;

Modified: trunk/src/lib/krb5/ccache/cc_mslsa.c
===================================================================
--- trunk/src/lib/krb5/ccache/cc_mslsa.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/ccache/cc_mslsa.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -489,7 +489,7 @@
         return FALSE;
     
     memcpy(ticket, newdata, sizeof(krb5_data));
-    krb5_xfree(newdata);
+    free(newdata);
     return TRUE;
 }
 
@@ -2056,7 +2056,7 @@
 
     lid->data = (krb5_pointer) malloc(sizeof(krb5_lcc_data));
     if (lid->data == NULL) {
-        krb5_xfree(lid);
+        free(lid);
         CloseHandle(LogonHandle);
         return KRB5_CC_NOMEM;
     }
@@ -2069,8 +2069,8 @@
 
     data->cc_name = (char *)malloc(strlen(residual)+1);
     if (data->cc_name == NULL) {
-        krb5_xfree(lid->data);
-        krb5_xfree(lid);
+        free(lid->data);
+        free(lid);
         CloseHandle(LogonHandle);
         return KRB5_CC_NOMEM;
     }
@@ -2090,9 +2090,9 @@
             krb5_copy_principal(context, creds.client, &data->princ);
         krb5_free_cred_contents(context,&creds);
     } else if (!does_retrieve_ticket_cache_ticket()) {
-        krb5_xfree(data->cc_name);
-        krb5_xfree(lid->data);
-        krb5_xfree(lid);
+        free(data->cc_name);
+        free(lid->data);
+        free(lid);
         CloseHandle(LogonHandle);
         return KRB5_FCC_NOFILE;
     }
@@ -2169,9 +2169,9 @@
 
         if (data) {
             CloseHandle(data->LogonHandle);
-            krb5_xfree(data);
+            free(data);
         }
-        krb5_xfree(id);
+        free(id);
     }
     return closeval;
 }

Modified: trunk/src/lib/krb5/keytab/kt_file.c
===================================================================
--- trunk/src/lib/krb5/keytab/kt_file.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/keytab/kt_file.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -210,21 +210,21 @@
     
     (*id)->ops = ops;
     if ((data = (krb5_ktfile_data *)malloc(sizeof(krb5_ktfile_data))) == NULL) {
-	krb5_xfree(*id);
+	free(*id);
 	return(ENOMEM);
     }
 
     err = k5_mutex_init(&data->lock);
     if (err) {
-	krb5_xfree(data);
-	krb5_xfree(*id);
+	free(data);
+	free(*id);
 	return err;
     }
 
     if ((data->name = strdup(name)) == NULL) {
 	k5_mutex_destroy(&data->lock);
-	krb5_xfree(data);
-	krb5_xfree(*id);
+	free(data);
+	free(*id);
 	return(ENOMEM);
     }
 
@@ -259,12 +259,12 @@
    * This routine should undo anything done by krb5_ktfile_resolve().
    */
 {
-    krb5_xfree(KTFILENAME(id));
+    free(KTFILENAME(id));
     zap(KTFILEBUFP(id), BUFSIZ);
     k5_mutex_destroy(&((krb5_ktfile_data *)id->data)->lock);
-    krb5_xfree(id->data);
+    free(id->data);
     id->ops = 0;
-    krb5_xfree(id);
+    free(id);
     return (0);
 }
 
@@ -533,7 +533,7 @@
 {
     krb5_error_code kerror;
 
-    krb5_xfree(*cursor);
+    free(*cursor);
     kerror = KTLOCK(id);
     if (kerror)
 	return kerror;
@@ -807,10 +807,10 @@
 		if (kret) {
 		    if (keytab->data) {
 			if (KTFILENAME(keytab))
-			    krb5_xfree(KTFILENAME(keytab));
-			krb5_xfree(keytab->data);
+			    free(KTFILENAME(keytab));
+			free(keytab->data);
 		    }
-		    krb5_xfree(keytab);
+		    free(keytab);
 		}
 		else {
 		    *buffer = bp;

Modified: trunk/src/lib/krb5/keytab/kt_memory.c
===================================================================
--- trunk/src/lib/krb5/keytab/kt_memory.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/keytab/kt_memory.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -167,7 +167,7 @@
 	next_node = node->next;
 
 	/* destroy the contents of node->keytab */
-	krb5_xfree(KTNAME(node->keytab));
+	free(KTNAME(node->keytab));
 
 	/* free the keytab entries */
 	for (cursor = KTLINK(node->keytab); cursor; cursor = next_cursor) {
@@ -176,21 +176,21 @@
  	     * krb5_context since we know that the context isn't used by
 	     * krb5_kt_free_entry or krb5_free_principal. */
 	    krb5_kt_free_entry(NULL, cursor->entry);
-	    krb5_xfree(cursor->entry);
-	    krb5_xfree(cursor);
+	    free(cursor->entry);
+	    free(cursor);
 	}
 
 	/* destroy the lock */
 	k5_mutex_destroy(&(((krb5_mkt_data *)node->keytab->data)->lock));
 
 	/* free the private data */
-	krb5_xfree(node->keytab->data);
+	free(node->keytab->data);
 
 	/* and the keytab */
-	krb5_xfree(node->keytab);
+	free(node->keytab);
 
 	/* and finally the node */
-	krb5_xfree(node);
+	free(node);
     }
 }
 /*
@@ -230,15 +230,15 @@
     }
 
     if ((list->keytab = (krb5_keytab)malloc(sizeof(struct _krb5_kt))) == NULL) {
-	krb5_xfree(list);
+	free(list);
 	err = ENOMEM;
 	goto done;	
     }
 
     list->keytab->ops = &krb5_mkt_ops;
     if ((data = (krb5_mkt_data *)malloc(sizeof(krb5_mkt_data))) == NULL) {
-	krb5_xfree(list->keytab);
-	krb5_xfree(list);
+	free(list->keytab);
+	free(list);
 	err = ENOMEM;
 	goto done;
     }
@@ -246,17 +246,17 @@
 
     err = k5_mutex_init(&data->lock);
     if (err) {
-	krb5_xfree(data);
-	krb5_xfree(list->keytab);
-	krb5_xfree(list);
+	free(data);
+	free(list->keytab);
+	free(list);
 	goto done;
     }
 
     if ((data->name = strdup(name)) == NULL) {
 	k5_mutex_destroy(&data->lock);
-	krb5_xfree(data);
-	krb5_xfree(list->keytab);
-	krb5_xfree(list);
+	free(data);
+	free(list->keytab);
+	free(list);
 	err = ENOMEM;
 	goto done;
     }
@@ -276,11 +276,11 @@
     if (err) {
 	k5_mutex_destroy(&data->lock);
      	if (data && data->name) 
-		krb5_xfree(data->name);
-	krb5_xfree(data);
+		free(data->name);
+	free(data);
 	if (list && list->keytab)
-		krb5_xfree(list->keytab);
-	krb5_xfree(list);
+		free(list->keytab);
+	free(list);
     } else {
 	KTREFCNT(*id)++;
 	KTUNLOCK(*id);
@@ -350,28 +350,28 @@
 	*listp = node->next;
 
 	/* destroy the contents of node->keytab (aka id) */
-	krb5_xfree(data->name);
+	free(data->name);
 
 	/* free the keytab entries */
 	for (cursor = KTLINK(node->keytab); cursor; cursor = next_cursor) {
 	    next_cursor = cursor->next;
 
 	    krb5_kt_free_entry(context, cursor->entry);
-	    krb5_xfree(cursor->entry);
-	    krb5_xfree(cursor);
+	    free(cursor->entry);
+	    free(cursor);
 	}
 
 	/* destroy the lock */
 	k5_mutex_destroy(&(data->lock));
 
 	/* free the private data */
-	krb5_xfree(data);
+	free(data);
 
 	/* and the keytab */
-	krb5_xfree(node->keytab);
+	free(node->keytab);
 
 	/* and finally the node */
-	krb5_xfree(node);
+	free(node);
     }
 #endif /* HEIMDAL_COMPATIBLE */
 
@@ -567,7 +567,7 @@
     }
     cursor->entry = (krb5_keytab_entry *)malloc(sizeof(krb5_keytab_entry));
     if (cursor->entry == NULL) {
-	krb5_xfree(cursor);
+	free(cursor);
 	err = ENOMEM;
 	goto done;
     }
@@ -577,16 +577,16 @@
     err = krb5_copy_keyblock_contents(context, &(entry->key), 
 				      &(cursor->entry->key));
     if (err) {
-	krb5_xfree(cursor->entry);
-	krb5_xfree(cursor);
+	free(cursor->entry);
+	free(cursor);
 	goto done;
     }
 
     err = krb5_copy_principal(context, entry->principal, &(cursor->entry->principal));
     if (err) {
 	krb5_free_keyblock_contents(context, &(cursor->entry->key));
-	krb5_xfree(cursor->entry);
-	krb5_xfree(cursor);
+	free(cursor->entry);
+	free(cursor);
 	goto done;
     }
 
@@ -635,9 +635,9 @@
     }
 
     krb5_kt_free_entry(context, (*pcursor)->entry);
-    krb5_xfree((*pcursor)->entry);
+    free((*pcursor)->entry);
     next = (*pcursor)->next;
-    krb5_xfree(*pcursor);
+    free(*pcursor);
     (*pcursor) = next;
 
   done:

Modified: trunk/src/lib/krb5/keytab/kt_srvtab.c
===================================================================
--- trunk/src/lib/krb5/keytab/kt_srvtab.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/keytab/kt_srvtab.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -123,14 +123,14 @@
     (*id)->ops = &krb5_kts_ops;
     data = (krb5_ktsrvtab_data *)malloc(sizeof(krb5_ktsrvtab_data));
     if (data == NULL) {
-	krb5_xfree(*id);
+	free(*id);
 	return(ENOMEM);
     }
 
     data->name = strdup(name);
     if (data->name == NULL) {
-	krb5_xfree(data);
-	krb5_xfree(*id);
+	free(data);
+	free(*id);
 	return(ENOMEM);
     }
 
@@ -156,10 +156,10 @@
    * This routine should undo anything done by krb5_ktsrvtab_resolve().
    */
 {
-    krb5_xfree(KTFILENAME(id));
-    krb5_xfree(id->data);
+    free(KTFILENAME(id));
+    free(id->data);
     id->ops = 0;
-    krb5_xfree(id);
+    free(id);
     return (0);
 }
 
@@ -307,7 +307,7 @@
 krb5_error_code KRB5_CALLCONV
 krb5_ktsrvtab_end_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor)
 {
-    krb5_xfree(*cursor);
+    free(*cursor);
     return krb5_ktsrvint_close(context, id);
 }
 

Modified: trunk/src/lib/krb5/keytab/ktfr_entry.c
===================================================================
--- trunk/src/lib/krb5/keytab/ktfr_entry.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/keytab/ktfr_entry.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -39,7 +39,7 @@
     krb5_free_principal(context, entry->principal);
     if (entry->key.contents) {
 	zap((char *)entry->key.contents, entry->key.length);
-	krb5_xfree(entry->key.contents);
+	free(entry->key.contents);
     }
     return 0;
 }

Modified: trunk/src/lib/krb5/krb/auth_con.c
===================================================================
--- trunk/src/lib/krb5/krb/auth_con.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/auth_con.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -12,7 +12,7 @@
 	return ENOMEM;
     *tmpad = *inad;
     if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
-	krb5_xfree(tmpad);
+	free(tmpad);
 	return ENOMEM;
     }
     memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
@@ -63,7 +63,7 @@
     if (auth_context->rcache)
 	krb5_rc_close(context, auth_context->rcache);
     if (auth_context->permitted_etypes)
-	krb5_xfree(auth_context->permitted_etypes);
+	free(auth_context->permitted_etypes);
     free(auth_context);
     return 0;
 }
@@ -336,7 +336,7 @@
 	return(ENOMEM);
 
     if (auth_context->permitted_etypes)
-	krb5_xfree(auth_context->permitted_etypes);
+	free(auth_context->permitted_etypes);
 
     auth_context->permitted_etypes = newpe;
 

Modified: trunk/src/lib/krb5/krb/bld_pr_ext.c
===================================================================
--- trunk/src/lib/krb5/krb/bld_pr_ext.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/bld_pr_ext.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -59,15 +59,15 @@
 	return ENOMEM;
     princ_ret = (krb5_principal) malloc(sizeof(krb5_principal_data));
     if (!princ_ret) {
-	krb5_xfree(princ_data);
+	free(princ_data);
 	return ENOMEM;
     }
     princ_ret->data = princ_data;
     princ_ret->length = count;
     tmpdata = malloc(rlen+1);
     if (!tmpdata) {
-	krb5_xfree(princ_data);
-	krb5_xfree(princ_ret);
+	free(princ_data);
+	free(princ_ret);
 	return ENOMEM;
     }	
     krb5_princ_set_realm_length(context, princ_ret, rlen);
@@ -94,10 +94,10 @@
 
 free_out:
     while (--i >= 0)
-	krb5_xfree(princ_data[i].data);
-    krb5_xfree(princ_data);
-    krb5_xfree(princ_ret);
-    krb5_xfree(tmpdata);
+	free(princ_data[i].data);
+    free(princ_data);
+    free(princ_ret);
+    free(tmpdata);
     va_end(ap);
     return ENOMEM;
 }

Modified: trunk/src/lib/krb5/krb/bld_princ.c
===================================================================
--- trunk/src/lib/krb5/krb/bld_princ.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/bld_princ.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -97,11 +97,11 @@
     
     if (data) {
         while (--count >= 0) {
-            krb5_xfree(data[count].data);
+            free(data[count].data);
         }
-        krb5_xfree(data);
+        free(data);
     }
-    krb5_xfree(r);
+    free(r);
     
     return retval;
 }
@@ -140,7 +140,7 @@
     if (!retval) {
 	*princ = p;
     } else {
-        krb5_xfree(p);
+        free(p);
     }
     
     return retval;    
@@ -165,7 +165,7 @@
     if (!retval) {
 	*princ = p;
     } else {
-        krb5_xfree(p);
+        free(p);
     }
 
     return retval;

Modified: trunk/src/lib/krb5/krb/chpw.c
===================================================================
--- trunk/src/lib/krb5/krb/chpw.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/chpw.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -225,7 +225,7 @@
 
 cleanup:
     if (ap_rep.length) {
-	krb5_xfree(clearresult.data);
+	free(clearresult.data);
     } else {
 	krb5_free_error(context, krberror);
     }

Modified: trunk/src/lib/krb5/krb/conv_princ.c
===================================================================
--- trunk/src/lib/krb5/krb/conv_princ.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/conv_princ.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -334,7 +334,7 @@
 			      *cp = tolower((unsigned char) *cp);
 		      strncat(buf, ".", sizeof(buf) - 1 - strlen(buf));
 		      strncat(buf, domain, sizeof(buf) - 1 - strlen(buf));
-		      krb5_xfree(domain);
+		      free(domain);
 		  }
 		  instance = buf;
 	      }

Modified: trunk/src/lib/krb5/krb/copy_addrs.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_addrs.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/copy_addrs.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -38,7 +38,7 @@
 	return ENOMEM;
     *tmpad = *inad;
     if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
-	krb5_xfree(tmpad);
+	free(tmpad);
 	return ENOMEM;
     }
     memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);

Modified: trunk/src/lib/krb5/krb/copy_athctr.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_athctr.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/copy_athctr.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -41,24 +41,24 @@
 
     retval = krb5_copy_principal(context, authfrom->client, &tempto->client);
     if (retval) {
-	krb5_xfree(tempto);
+	free(tempto);
 	return retval;
     }
     
     if (authfrom->checksum &&
 	(retval = krb5_copy_checksum(context, authfrom->checksum, &tempto->checksum))) {
 	    krb5_free_principal(context, tempto->client);    
-	    krb5_xfree(tempto);
+	    free(tempto);
 	    return retval;
     }
     
     if (authfrom->subkey) {
 	    retval = krb5_copy_keyblock(context, authfrom->subkey, &tempto->subkey);
 	    if (retval) {
-		    krb5_xfree(tempto->subkey);
+		    free(tempto->subkey);
 		    krb5_free_checksum(context, tempto->checksum);
 		    krb5_free_principal(context, tempto->client);    
-		    krb5_xfree(tempto);
+		    free(tempto);
 		    return retval;
 	    }
     }
@@ -67,11 +67,11 @@
 		retval = krb5_copy_authdata(context, authfrom->authorization_data,
 				    &tempto->authorization_data);
 		if (retval) {
-		    krb5_xfree(tempto->subkey);
+		    free(tempto->subkey);
 		    krb5_free_checksum(context, tempto->checksum);
 		    krb5_free_principal(context, tempto->client);    
 		    krb5_free_authdata(context, tempto->authorization_data);
-		    krb5_xfree(tempto);
+		    free(tempto);
 		    return retval;
 		}
     }

Modified: trunk/src/lib/krb5/krb/copy_auth.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_auth.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/copy_auth.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -65,7 +65,7 @@
 	return ENOMEM;
     *tmpad = *inad;
     if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
-	krb5_xfree(tmpad);
+	free(tmpad);
 	return ENOMEM;
     }
     memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);

Modified: trunk/src/lib/krb5/krb/copy_cksum.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_cksum.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/copy_cksum.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -40,7 +40,7 @@
 
     if (!(tempto->contents =
 	  (krb5_octet *)malloc(tempto->length))) {
-	krb5_xfree(tempto);
+	free(tempto);
 	return ENOMEM;
     }
     memcpy((char *) tempto->contents, (char *) ckfrom->contents,

Modified: trunk/src/lib/krb5/krb/copy_creds.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_creds.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/copy_creds.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -81,13 +81,13 @@
     if (retval)
 	goto cleanaddrs;
     tempcred->ticket = *scratch;
-    krb5_xfree(scratch);
+    free(scratch);
     retval = krb5_copy_data(context, &incred->second_ticket, &scratch);
     if (retval)
 	goto clearticket;
 
     tempcred->second_ticket = *scratch;
-    krb5_xfree(scratch);
+    free(scratch);
 
     retval = krb5_copy_authdata(context, incred->authdata,&tempcred->authdata);
     if (retval)
@@ -104,7 +104,7 @@
  cleanaddrs:
     krb5_free_addresses(context, tempcred->addresses);
  cleanblock:
-    krb5_xfree(tempcred->keyblock.contents);
+    free(tempcred->keyblock.contents);
  cleanserver:
     krb5_free_principal(context, tempcred->server);
  cleanclient:

Modified: trunk/src/lib/krb5/krb/copy_data.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_data.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/copy_data.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -48,7 +48,7 @@
 
     retval = krb5int_copy_data_contents(context, indata, tempdata);
     if (retval) {
-	krb5_xfree(tempdata);
+	free(tempdata);
 	return retval;
     }
 

Modified: trunk/src/lib/krb5/krb/copy_key.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_key.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/copy_key.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -41,7 +41,7 @@
 		return ENOMEM;
 	*new_key = *from;
 	if (!(new_key->contents = (krb5_octet *)malloc(new_key->length))) {
-		krb5_xfree(new_key);
+		free(new_key);
 		return(ENOMEM);
 	}
 	memcpy((char *)new_key->contents, (char *)from->contents,

Modified: trunk/src/lib/krb5/krb/copy_tick.c
===================================================================
--- trunk/src/lib/krb5/krb/copy_tick.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/copy_tick.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -41,13 +41,13 @@
     retval = krb5_copy_keyblock(context, partfrom->session,
 				&tempto->session);
     if (retval) {
-	krb5_xfree(tempto);
+	free(tempto);
 	return retval;
     }
     retval = krb5_copy_principal(context, partfrom->client, &tempto->client);
     if (retval) {
 	krb5_free_keyblock(context, tempto->session);
-	krb5_xfree(tempto);
+	free(tempto);
 	return retval;
     }
     tempto->transited = partfrom->transited;
@@ -59,7 +59,7 @@
 	if (!tempto->transited.tr_contents.data) {
 	    krb5_free_principal(context, tempto->client);
 	    krb5_free_keyblock(context, tempto->session);
-	    krb5_xfree(tempto);
+	    free(tempto);
 	    return ENOMEM;
 	}
 	memcpy((char *)tempto->transited.tr_contents.data,
@@ -69,10 +69,10 @@
 
     retval = krb5_copy_addresses(context, partfrom->caddrs, &tempto->caddrs);
     if (retval) {
-	krb5_xfree(tempto->transited.tr_contents.data);
+	free(tempto->transited.tr_contents.data);
 	krb5_free_principal(context, tempto->client);
 	krb5_free_keyblock(context, tempto->session);
-	krb5_xfree(tempto);
+	free(tempto);
 	return retval;
     }
     if (partfrom->authorization_data) {
@@ -80,10 +80,10 @@
 				    &tempto->authorization_data);
 	if (retval) {
 	    krb5_free_addresses(context, tempto->caddrs);
-	    krb5_xfree(tempto->transited.tr_contents.data);
+	    free(tempto->transited.tr_contents.data);
 	    krb5_free_principal(context, tempto->client);
 	    krb5_free_keyblock(context, tempto->session);
-	    krb5_xfree(tempto);
+	    free(tempto);
 	    return retval;
 	}
     }
@@ -103,22 +103,22 @@
     *tempto = *from;
     retval = krb5_copy_principal(context, from->server, &tempto->server);
     if (retval) {
-	krb5_xfree(tempto);
+	free(tempto);
 	return retval;
     }
     retval = krb5_copy_data(context, &from->enc_part.ciphertext, &scratch);
     if (retval) {
 	krb5_free_principal(context, tempto->server);
-	krb5_xfree(tempto);
+	free(tempto);
 	return retval;
     }
     tempto->enc_part.ciphertext = *scratch;
-    krb5_xfree(scratch);
+    free(scratch);
     retval = krb5_copy_enc_tkt_part(context, from->enc_part2, &tempto->enc_part2);
     if (retval) {
-	krb5_xfree(tempto->enc_part.ciphertext.data);
+	free(tempto->enc_part.ciphertext.data);
 	krb5_free_principal(context, tempto->server);
-	krb5_xfree(tempto);
+	free(tempto);
 	return retval;
     }	
     *pto = tempto;

Modified: trunk/src/lib/krb5/krb/free_rtree.c
===================================================================
--- trunk/src/lib/krb5/krb/free_rtree.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/free_rtree.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -37,5 +37,5 @@
 	krb5_free_principal(context, *nrealms);
 	nrealms++;
     }
-    krb5_xfree(realms);
+    free(realms);
 }

Modified: trunk/src/lib/krb5/krb/fwd_tgt.c
===================================================================
--- trunk/src/lib/krb5/krb/fwd_tgt.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/fwd_tgt.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -181,7 +181,7 @@
 	    krb5_free_data(context, scratch);
     } else {
 	*outbuf = *scratch;
-	krb5_xfree(scratch);
+	free(scratch);
     }
         
 errout:

Modified: trunk/src/lib/krb5/krb/gc_via_tkt.c
===================================================================
--- trunk/src/lib/krb5/krb/gc_via_tkt.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/gc_via_tkt.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -57,7 +57,7 @@
     if ((retval = krb5_copy_data(context, psectkt, &pdata)))
 	goto cleanup;
     (*ppcreds)->second_ticket = *pdata;
-    krb5_xfree(pdata);
+    free(pdata);
 
     (*ppcreds)->ticket_flags = pkdcrep->enc_part2->flags;
     (*ppcreds)->times = pkdcrep->enc_part2->times;

Modified: trunk/src/lib/krb5/krb/gen_subkey.c
===================================================================
--- trunk/src/lib/krb5/krb/gen_subkey.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/gen_subkey.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -56,7 +56,7 @@
 	return(ENOMEM);
 
     if ((retval = krb5_c_make_random_key(context, enctype, *subkey))) {
-	krb5_xfree(*subkey);
+	free(*subkey);
 	return(retval);
     }
 

Modified: trunk/src/lib/krb5/krb/get_creds.c
===================================================================
--- trunk/src/lib/krb5/krb/get_creds.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/get_creds.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -128,7 +128,7 @@
     /* The caller is now responsible for cleaning up in_creds */
     if ((retval = krb5_cc_retrieve_cred(context, ccache, fields, &mcreds,
 					ncreds))) {
-	krb5_xfree(ncreds);
+	free(ncreds);
 	ncreds = in_creds;
     } else {
 	*out_creds = ncreds;
@@ -311,7 +311,7 @@
     /* ick.  copy the struct contents, free the container */
     if (out_creds) {
 	*creds = *out_creds;
-	krb5_xfree(out_creds);
+	free(out_creds);
     }
 
 cleanup:

Modified: trunk/src/lib/krb5/krb/get_in_tkt.c
===================================================================
--- trunk/src/lib/krb5/krb/get_in_tkt.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/get_in_tkt.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -272,7 +272,7 @@
     
 	retval = (*key_proc)(context, as_reply->enc_part.enctype,
 			     &salt, keyseed, &decrypt_key);
-	krb5_xfree(salt.data);
+	free(salt.data);
 	if (retval)
 	    goto cleanup;
     }
@@ -409,7 +409,7 @@
 	goto cleanup;
 
     creds->ticket = *packet;
-    krb5_xfree(packet);
+    free(packet);
 
     /* store it in the ccache! */
     if (ccache)
@@ -430,12 +430,12 @@
 	if (creds->keyblock.contents) {
 	    memset((char *)creds->keyblock.contents, 0,
 		   creds->keyblock.length);
-	    krb5_xfree(creds->keyblock.contents);
+	    free(creds->keyblock.contents);
 	    creds->keyblock.contents = 0;
 	    creds->keyblock.length = 0;
 	}
 	if (creds->ticket.data) {
-	    krb5_xfree(creds->ticket.data);
+	    free(creds->ticket.data);
 	    creds->ticket.data = 0;
 	}
 	if (creds->addresses) {
@@ -1489,7 +1489,7 @@
 	krb5_free_keyblock_contents(context, &as_key);
     if (salt.data &&
 	(!(options && (options->flags & KRB5_GET_INIT_CREDS_OPT_SALT))))
-	krb5_xfree(salt.data);
+	free(salt.data);
     krb5_free_data_contents(context, &s2kparams);
     if (as_reply)
 	*as_reply = local_as_reply;

Modified: trunk/src/lib/krb5/krb/gic_keytab.c
===================================================================
--- trunk/src/lib/krb5/krb/gic_keytab.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/gic_keytab.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -69,7 +69,7 @@
     /* again, krb5's memory management is lame... */
 
     *as_key = *kt_key;
-    krb5_xfree(kt_key);
+    free(kt_key);
 
     (void) krb5_kt_free_entry(context, &kt_ent);
 

Modified: trunk/src/lib/krb5/krb/gic_pwd.c
===================================================================
--- trunk/src/lib/krb5/krb/gic_pwd.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/gic_pwd.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -76,7 +76,7 @@
 					   params->data?params:NULL, as_key);
 
     if (defsalt.length)
-	krb5_xfree(defsalt.data);
+	free(defsalt.data);
 
     return(ret);
 }
@@ -274,7 +274,7 @@
 	 /* the change succeeded.  go on */
 
 	 if (result_code == 0) {
-	    krb5_xfree(result_string.data);
+	    free(result_string.data);
 	    break;
 	 }
 
@@ -283,7 +283,7 @@
 	 ret = KRB5_CHPW_FAIL;
 
 	 if (result_code != KRB5_KPASSWD_SOFTERROR) {
-	    krb5_xfree(result_string.data);
+	    free(result_string.data);
 	    goto cleanup;
 	 }
 
@@ -301,8 +301,8 @@
 		  (int) result_string.length,
 		  result_string.data ? result_string.data : "");
 
-	 krb5_xfree(code_string.data);
-	 krb5_xfree(result_string.data);
+	 free(code_string.data);
+	 free(result_string.data);
       }
    }
 

Modified: trunk/src/lib/krb5/krb/kfree.c
===================================================================
--- trunk/src/lib/krb5/krb/kfree.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/kfree.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -59,8 +59,8 @@
 krb5_free_address(krb5_context context, krb5_address *val)
 {
     if (val->contents)
-	krb5_xfree(val->contents);
-    krb5_xfree(val);
+	free(val->contents);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -70,10 +70,10 @@
 
     for (temp = val; *temp; temp++) {
 	if ((*temp)->contents)
-	    krb5_xfree((*temp)->contents);
-	krb5_xfree(*temp);
+	    free((*temp)->contents);
+	free(*temp);
     }
-    krb5_xfree(val);
+    free(val);
 }
 
 
@@ -81,8 +81,8 @@
 krb5_free_ap_rep(krb5_context context, register krb5_ap_rep *val)
 {
     if (val->enc_part.ciphertext.data)
-	krb5_xfree(val->enc_part.ciphertext.data);
-    krb5_xfree(val);
+	free(val->enc_part.ciphertext.data);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -91,8 +91,8 @@
     if (val->ticket)
 	krb5_free_ticket(context, val->ticket);
     if (val->authenticator.ciphertext.data)
-	krb5_xfree(val->authenticator.ciphertext.data);
-    krb5_xfree(val);
+	free(val->authenticator.ciphertext.data);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -100,7 +100,7 @@
 {
     if (val->subkey)
 	krb5_free_keyblock(context, val->subkey);
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -131,31 +131,31 @@
 
     for (temp = val; *temp; temp++) {
 	if ((*temp)->contents)
-	    krb5_xfree((*temp)->contents);
-	krb5_xfree(*temp);
+	    free((*temp)->contents);
+	free(*temp);
     }
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
 krb5_free_authenticator(krb5_context context, krb5_authenticator *val)
 {
     krb5_free_authenticator_contents(context, val);
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
 krb5_free_checksum(krb5_context context, register krb5_checksum *val)
 {
     krb5_free_checksum_contents(context, val);
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
 krb5_free_checksum_contents(krb5_context context, register krb5_checksum *val)
 {
     if (val->contents) {
-	krb5_xfree(val->contents);
+	free(val->contents);
 	val->contents = 0;
     }
 }
@@ -166,8 +166,8 @@
     if (val->tickets)
         krb5_free_tickets(context, val->tickets);
     if (val->enc_part.ciphertext.data)
-	krb5_xfree(val->enc_part.ciphertext.data);
-    krb5_xfree(val);
+	free(val->enc_part.ciphertext.data);
+    free(val);
 }
 
 /*
@@ -188,15 +188,15 @@
     }
     if (val->keyblock.contents) {
 	memset((char *)val->keyblock.contents, 0, val->keyblock.length);
-	krb5_xfree(val->keyblock.contents);
+	free(val->keyblock.contents);
 	val->keyblock.contents = 0;
     }
     if (val->ticket.data) {
-	krb5_xfree(val->ticket.data);
+	free(val->ticket.data);
 	val->ticket.data = 0;
     }
     if (val->second_ticket.data) {
-	krb5_xfree(val->second_ticket.data);
+	free(val->second_ticket.data);
 	val->second_ticket.data = 0;
     }
     if (val->addresses) {
@@ -233,9 +233,9 @@
 		krb5_free_principal(context, (*temp)->server);
 	    if ((*temp)->caddrs)
 		krb5_free_addresses(context, (*temp)->caddrs);
-	    krb5_xfree((*temp));
+	    free((*temp));
 	}
-	krb5_xfree(val->ticket_info);
+	free(val->ticket_info);
 	val->ticket_info = 0;
     }
 }
@@ -245,7 +245,7 @@
 krb5_free_creds(krb5_context context, krb5_creds *val)
 {
     krb5_free_cred_contents(context, val);
-    krb5_xfree(val);
+    free(val);
 }
 
 
@@ -253,15 +253,15 @@
 krb5_free_data(krb5_context context, krb5_data *val)
 {
     if (val->data)
-	krb5_xfree(val->data);
-    krb5_xfree(val);
+	free(val->data);
+    free(val);
 }
 
 void KRB5_CALLCONV
 krb5_free_data_contents(krb5_context context, krb5_data *val)
 {
     if (val->data) {
-	krb5_xfree(val->data);
+	free(val->data);
 	val->data = 0;
     }
 }
@@ -291,7 +291,7 @@
 	krb5_free_principal(context, val->server);
     if (val->caddrs)
 	krb5_free_addresses(context, val->caddrs);
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -302,12 +302,12 @@
     if (val->client)
 	krb5_free_principal(context, val->client);
     if (val->transited.tr_contents.data)
-	krb5_xfree(val->transited.tr_contents.data);
+	free(val->transited.tr_contents.data);
     if (val->caddrs)
 	krb5_free_addresses(context, val->caddrs);
     if (val->authorization_data)
 	krb5_free_authdata(context, val->authorization_data);
-    krb5_xfree(val);
+    free(val);
 }
 
 
@@ -319,10 +319,10 @@
     if (val->server)
 	krb5_free_principal(context, val->server);
     if (val->text.data)
-	krb5_xfree(val->text.data);
+	free(val->text.data);
     if (val->e_data.data)
-	krb5_xfree(val->e_data.data);
-    krb5_xfree(val);
+	free(val->e_data.data);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -335,10 +335,10 @@
     if (val->ticket)
 	krb5_free_ticket(context, val->ticket);
     if (val->enc_part.ciphertext.data)
-	krb5_xfree(val->enc_part.ciphertext.data);
+	free(val->enc_part.ciphertext.data);
     if (val->enc_part2)
 	krb5_free_enc_kdc_rep_part(context, val->enc_part2);
-    krb5_xfree(val);
+    free(val);
 }
 
 
@@ -352,16 +352,16 @@
     if (val->server)
 	krb5_free_principal(context, val->server);
     if (val->ktype)
-	krb5_xfree(val->ktype);
+	free(val->ktype);
     if (val->addresses)
 	krb5_free_addresses(context, val->addresses);
     if (val->authorization_data.ciphertext.data)
-	krb5_xfree(val->authorization_data.ciphertext.data);
+	free(val->authorization_data.ciphertext.data);
     if (val->unenc_authdata)
 	krb5_free_authdata(context, val->unenc_authdata);
     if (val->second_ticket)
 	krb5_free_tickets(context, val->second_ticket);
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -384,8 +384,8 @@
     register krb5_last_req_entry **temp;
 
     for (temp = val; *temp; temp++)
-	krb5_xfree(*temp);
-    krb5_xfree(val);
+	free(*temp);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -395,10 +395,10 @@
 
     for (temp = val; *temp; temp++) {
 	if ((*temp)->contents)
-	    krb5_xfree((*temp)->contents);
-	krb5_xfree(*temp);
+	    free((*temp)->contents);
+	free(*temp);
     }
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -413,31 +413,31 @@
 	i = krb5_princ_size(context, val);
 	while(--i >= 0)
 	    free(krb5_princ_component(context, val, i)->data);
-	krb5_xfree(val->data);
+	free(val->data);
     }
     if (val->realm.data)
-	krb5_xfree(val->realm.data);
-    krb5_xfree(val);
+	free(val->realm.data);
+    free(val);
 }
 
 void KRB5_CALLCONV
 krb5_free_priv(krb5_context context, register krb5_priv *val)
 {
     if (val->enc_part.ciphertext.data)
-	krb5_xfree(val->enc_part.ciphertext.data);
-    krb5_xfree(val);
+	free(val->enc_part.ciphertext.data);
+    free(val);
 }
 
 void KRB5_CALLCONV
 krb5_free_priv_enc_part(krb5_context context, register krb5_priv_enc_part *val)
 {
     if (val->user_data.data)
-	krb5_xfree(val->user_data.data);
+	free(val->user_data.data);
     if (val->r_address)
 	krb5_free_address(context, val->r_address);
     if (val->s_address)
 	krb5_free_address(context, val->s_address);
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -445,7 +445,7 @@
 {
     if (val->element)
 	krb5_free_pwd_sequences(context, val->element);
-    krb5_xfree(val);
+    free(val);
 }
 
 
@@ -463,9 +463,9 @@
 	   krb5_free_data(context, (*temp)->phrase);
 	   (*temp)->phrase = 0;
 	}
-	krb5_xfree(*temp);
+	free(*temp);
     }
-    krb5_xfree(val);
+    free(val);
 }
 
 
@@ -473,14 +473,14 @@
 krb5_free_safe(krb5_context context, register krb5_safe *val)
 {
     if (val->user_data.data)
-	krb5_xfree(val->user_data.data);
+	free(val->user_data.data);
     if (val->r_address)
 	krb5_free_address(context, val->r_address);
     if (val->s_address)
 	krb5_free_address(context, val->s_address);
     if (val->checksum)
 	krb5_free_checksum(context, val->checksum);
-    krb5_xfree(val);
+    free(val);
 }
 
 
@@ -490,10 +490,10 @@
     if (val->server)
 	krb5_free_principal(context, val->server);
     if (val->enc_part.ciphertext.data)
-	krb5_xfree(val->enc_part.ciphertext.data);
+	free(val->enc_part.ciphertext.data);
     if (val->enc_part2)
 	krb5_free_enc_tkt_part(context, val->enc_part2);
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
@@ -503,7 +503,7 @@
 
     for (temp = val; *temp; temp++)
         krb5_free_ticket(context, *temp);
-    krb5_xfree(val);
+    free(val);
 }
 
 
@@ -513,7 +513,7 @@
     register krb5_creds **tgtpp;
     for (tgtpp = tgts; *tgtpp; tgtpp++)
 	krb5_free_creds(context, *tgtpp);
-    krb5_xfree(tgts);
+    free(tgts);
 }
 
 void KRB5_CALLCONV
@@ -523,14 +523,14 @@
 	    krb5_free_ticket(context, val->ticket);
     if (val->authenticator)
 	    krb5_free_authenticator(context, val->authenticator);
-    krb5_xfree(val);
+    free(val);
 }
 
 void KRB5_CALLCONV
 krb5_free_unparsed_name(krb5_context context, char *val)
 {
     if (val)
-	krb5_xfree(val);
+	free(val);
 }
 
 void KRB5_CALLCONV
@@ -539,7 +539,7 @@
     if (!sc)
 	return;
     krb5_free_sam_challenge_contents(ctx, sc);
-    krb5_xfree(sc);
+    free(sc);
 }
 
 void KRB5_CALLCONV
@@ -548,7 +548,7 @@
     if (!sc2)
 	return;
     krb5_free_sam_challenge_2_contents(ctx, sc2);
-    krb5_xfree(sc2);
+    free(sc2);
 }
 
 void KRB5_CALLCONV
@@ -569,7 +569,7 @@
     if (sc->sam_pk_for_sad.data)
 	krb5_free_data_contents(ctx, &sc->sam_pk_for_sad);
     if (sc->sam_cksum.contents) {
-	krb5_xfree(sc->sam_cksum.contents);
+	free(sc->sam_cksum.contents);
 	sc->sam_cksum.contents = 0;
     }
 }
@@ -590,7 +590,7 @@
 	    krb5_free_checksum(ctx, *cksump);
 	    cksump++;
 	}
-	krb5_xfree(sc2->sam_cksum);
+	free(sc2->sam_cksum);
 	sc2->sam_cksum = 0;
     }
 }
@@ -602,7 +602,7 @@
     if (!sc2)
 	return;
     krb5_free_sam_challenge_2_body_contents(ctx, sc2);
-    krb5_xfree(sc2);
+    free(sc2);
 }
 
 void KRB5_CALLCONV
@@ -631,7 +631,7 @@
     if (!sr)
 	return;
     krb5_free_sam_response_contents(ctx, sr);
-    krb5_xfree(sr);
+    free(sr);
 }
 
 void KRB5_CALLCONV
@@ -640,7 +640,7 @@
     if (!sr2)
 	return;
     krb5_free_sam_response_2_contents(ctx, sr2);
-    krb5_xfree(sr2);
+    free(sr2);
 }
 
 void KRB5_CALLCONV
@@ -674,7 +674,7 @@
     if (!psr)
 	return;
     krb5_free_predicted_sam_response_contents(ctx, psr);
-    krb5_xfree(psr);
+    free(psr);
 }
 
 void KRB5_CALLCONV
@@ -700,7 +700,7 @@
     if (!esre)
 	return;
     krb5_free_enc_sam_response_enc_contents(ctx, esre);
-    krb5_xfree(esre);
+    free(esre);
 }
 
 void KRB5_CALLCONV 
@@ -710,7 +710,7 @@
     if (!esre2)
 	return;
     krb5_free_enc_sam_response_enc_2_contents(ctx, esre2);
-    krb5_xfree(esre2);
+    free(esre2);
 }
 
 void KRB5_CALLCONV
@@ -738,7 +738,7 @@
 {
     if (!pa_enc_ts)
 	return;
-    krb5_xfree(pa_enc_ts);
+    free(pa_enc_ts);
 }
 
 void KRB5_CALLCONV
@@ -752,7 +752,7 @@
     }
     krb5_free_checksum_contents(context, &req->cksum);
     krb5_free_data_contents(context, &req->auth_package);
-    krb5_xfree(req);
+    free(req);
 }
 
 void KRB5_CALLCONV
@@ -774,7 +774,7 @@
 	ref->requested_principal_name = NULL;
     }
     krb5_free_checksum_contents(context, &ref->rep_cksum); 
-    krb5_xfree(ref);
+    free(ref);
 }
 
 void KRB5_CALLCONV
@@ -787,7 +787,7 @@
 	krb5_free_principal(context, ref->principal);
 	ref->principal = NULL;
     } 
-    krb5_xfree(ref);
+    free(ref);
 }
 
 void KRB5_CALLCONV
@@ -796,7 +796,7 @@
 {
     if (req == NULL)
 	return;
-    krb5_xfree(req);
+    free(req);
 }
 
 void KRB5_CALLCONV
@@ -805,7 +805,7 @@
 {
     if (etypes != NULL) {
 	if (etypes->etypes != NULL)
-	    krb5_xfree(etypes->etypes);
-	krb5_xfree(etypes);
+	    free(etypes->etypes);
+	free(etypes);
     }
 }

Modified: trunk/src/lib/krb5/krb/mk_cred.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_cred.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/mk_cred.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -38,7 +38,7 @@
     if (pkeyblock == NULL) {
 	    pencdata->ciphertext.data = scratch->data;
 	    pencdata->ciphertext.length = scratch->length;
-	    krb5_xfree(scratch);
+	    free(scratch);
 	    return 0;
     }
 
@@ -263,10 +263,10 @@
         replay.ctime = replaydata.timestamp;
         if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
             /* should we really error out here? XXX */
-            krb5_xfree(replay.client);
+            free(replay.client);
             goto error;
         }
-        krb5_xfree(replay.client);
+        free(replay.client);
     }
 
     /* Encode creds structure */

Modified: trunk/src/lib/krb5/krb/mk_error.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_error.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/mk_error.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -47,6 +47,6 @@
     if ((retval = encode_krb5_error(dec_err, &new_enc_err)))
 	return(retval);
     *enc_err = *new_enc_err;
-    krb5_xfree(new_enc_err);
+    free(new_enc_err);
     return 0;
 }

Modified: trunk/src/lib/krb5/krb/mk_priv.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_priv.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/mk_priv.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -91,7 +91,7 @@
         goto clean_encpart;
 
     *outbuf = *scratch2;
-    krb5_xfree(scratch2);
+    free(scratch2);
     retval = 0;
 
 clean_encpart:
@@ -209,7 +209,7 @@
 
 	if ((retval = krb5_gen_replay_name(context, auth_context->local_addr, 
 					   "_priv", &replay.client))) {
-    	    krb5_xfree(outbuf);
+    	    free(outbuf);
 	    goto error;
 	}
 
@@ -219,10 +219,10 @@
 	replay.ctime = replaydata.timestamp;
 	if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
 	    /* should we really error out here? XXX */
-    	    krb5_xfree(replay.client);
+    	    free(replay.client);
 	    goto error;
 	}
-	krb5_xfree(replay.client);
+	free(replay.client);
     }
 
     return 0;

Modified: trunk/src/lib/krb5/krb/mk_rep.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_rep.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/mk_rep.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -122,7 +122,7 @@
 
     if (!(retval = encode_krb5_ap_rep(&reply, &toutbuf))) {
 	*outbuf = *toutbuf;
-	krb5_xfree(toutbuf);
+	free(toutbuf);
     }
 
     memset(reply.enc_part.ciphertext.data, 0, reply.enc_part.ciphertext.length);

Modified: trunk/src/lib/krb5/krb/mk_req_ext.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_req_ext.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/mk_req_ext.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -261,7 +261,7 @@
 	goto cleanup_cksum;
     *outbuf = *toutbuf;
 
-    krb5_xfree(toutbuf);
+    free(toutbuf);
 
 cleanup_cksum:
     if (checksump && checksump->checksum_type != 0x8003)
@@ -270,7 +270,7 @@
 cleanup:
     if (desired_etypes &&
 	desired_etypes != (*auth_context)->permitted_etypes)
-	krb5_xfree(desired_etypes);
+	free(desired_etypes);
     if (request.ticket)
 	krb5_free_ticket(context, request.ticket);
     if (request.authenticator.ciphertext.data) {
@@ -280,8 +280,8 @@
     }
     if (scratch) {
 	memset(scratch->data, 0, scratch->length);
-        krb5_xfree(scratch->data);
-	krb5_xfree(scratch);
+        free(scratch->data);
+	free(scratch);
     }
     return retval;
 }
@@ -401,7 +401,7 @@
     adata[i]->ad_type = KRB5_AUTHDATA_IF_RELEVANT;
     adata[i]->length = ad_if_relevant->length;
     adata[i]->contents = (krb5_octet *)ad_if_relevant->data;
-    krb5_xfree(ad_if_relevant); /* contents owned by adata[i] */
+    free(ad_if_relevant); /* contents owned by adata[i] */
 
     adata[i + 1] = NULL;
 

Modified: trunk/src/lib/krb5/krb/mk_safe.c
===================================================================
--- trunk/src/lib/krb5/krb/mk_safe.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/mk_safe.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -98,11 +98,11 @@
 	goto cleanup_checksum;
     }
     *outbuf = *scratch2;
-    krb5_xfree(scratch2);
+    free(scratch2);
     retval = 0;
 
 cleanup_checksum:
-    krb5_xfree(safe_checksum.contents);
+    free(safe_checksum.contents);
 
     memset((char *)scratch1->data, 0, scratch1->length); 
     krb5_free_data(context, scratch1);
@@ -234,7 +234,7 @@
 
 	if ((retval = krb5_gen_replay_name(context, auth_context->local_addr, 
 					   "_safe", &replay.client))) {
-    	    krb5_xfree(outbuf);
+    	    free(outbuf);
 	    goto error;
 	}
 
@@ -244,10 +244,10 @@
 	replay.ctime = replaydata.timestamp;
 	if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
 	    /* should we really error out here? XXX */
-    	    krb5_xfree(outbuf);
+    	    free(outbuf);
 	    goto error;
 	}
-	krb5_xfree(replay.client);
+	free(replay.client);
     }
 
     return 0;

Modified: trunk/src/lib/krb5/krb/parse.c
===================================================================
--- trunk/src/lib/krb5/krb/parse.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/parse.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -148,7 +148,7 @@
 	}
 	principal->data = (krb5_data *) malloc(sizeof(krb5_data) * components);
 	if (principal->data == NULL) {
-	    krb5_xfree((char *)principal);
+	    free((char *)principal);
 	    return ENOMEM;
 	}
 	principal->length = components;
@@ -162,15 +162,15 @@
 	    if (flags & KRB5_PRINCIPAL_PARSE_REQUIRE_REALM) {
 		krb5_set_error_message(context, KRB5_PARSE_MALFORMED,
 				       "Principal %s is missing required realm", name);
-		krb5_xfree(principal->data);
-		krb5_xfree(principal);
+		free(principal->data);
+		free(principal);
 		return KRB5_PARSE_MALFORMED;
 	    }
 	    if (!default_realm && (flags & KRB5_PRINCIPAL_PARSE_NO_REALM) == 0) {
 		retval = krb5_get_default_realm(context, &default_realm);
 		if (retval) {
-		    krb5_xfree(principal->data);
-		    krb5_xfree((char *)principal);
+		    free(principal->data);
+		    free((char *)principal);
 		    return(retval);
 		}
 		default_realm_size = strlen(default_realm);
@@ -179,8 +179,8 @@
 	} else if (flags & KRB5_PRINCIPAL_PARSE_NO_REALM) {
 	    krb5_set_error_message(context, KRB5_PARSE_MALFORMED,
 				  "Principal %s has realm present", name);
-	    krb5_xfree(principal->data);
-	    krb5_xfree(principal);
+	    free(principal->data);
+	    free(principal);
 	    return KRB5_PARSE_MALFORMED;
 	}
 
@@ -237,9 +237,9 @@
 	 */
 	tmpdata = malloc(realmsize + 1);
 	if (tmpdata == 0) {
-		krb5_xfree(principal->data);
-		krb5_xfree(principal);
-		krb5_xfree(default_realm);
+		free(principal->data);
+		free(principal);
+		free(default_realm);
 		return ENOMEM;
 	}
 	krb5_princ_set_realm_length(context, principal, realmsize);
@@ -249,11 +249,11 @@
 		  malloc(krb5_princ_component(context, principal, i)->length + 1);
 		if (tmpdata2 == NULL) {
 			for (i--; i >= 0; i--)
-				krb5_xfree(krb5_princ_component(context, principal, i)->data);
-			krb5_xfree(krb5_princ_realm(context, principal)->data);
-			krb5_xfree(principal->data);
-			krb5_xfree(principal);
-			krb5_xfree(default_realm);
+				free(krb5_princ_component(context, principal, i)->data);
+			free(krb5_princ_realm(context, principal)->data);
+			free(principal->data);
+			free(principal);
+			free(default_realm);
 			return(ENOMEM);
 		}
 		krb5_princ_component(context, principal, i)->data = tmpdata2;
@@ -321,7 +321,7 @@
 	*nprincipal = principal;
 
 	if (default_realm != NULL)
-		krb5_xfree(default_realm);
+		free(default_realm);
 
 	return(0);
 }

Modified: trunk/src/lib/krb5/krb/preauth.c
===================================================================
--- trunk/src/lib/krb5/krb/preauth.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/preauth.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -227,7 +227,7 @@
     if (etype_info)
 	krb5_free_etype_info(context, etype_info);
     if (f_salt)
-	krb5_xfree(salt.data);
+	free(salt.data);
     if (send_pa_list)
 	krb5_free_pa_data(context, send_pa_list);
     if (def_enc_key)
@@ -314,7 +314,7 @@
 
     *out_padata = pa;
 
-    krb5_xfree(scratch);
+    free(scratch);
     scratch = 0;
 
     retval = 0;
@@ -323,7 +323,7 @@
     if (scratch)
 	krb5_free_data(context, scratch);
     if (enc_data.ciphertext.data)
-	krb5_xfree(enc_data.ciphertext.data);
+	free(enc_data.ciphertext.data);
     return retval;
 }
 
@@ -383,7 +383,7 @@
       /* we don't keep the new password, just the key... */
       retval = (*key_proc)(context, enctype, 0, 
 			   (krb5_const_pointer)&newpw, new_enc_key);
-      krb5_xfree(newpw.data);
+      free(newpw.data);
     }
     krb5_default_pwd_prompt1 = oldprompt;
     return retval;
@@ -569,6 +569,6 @@
     if (scratch)
 	krb5_free_data(context, scratch);
     if (sam_challenge)
-        krb5_xfree(sam_challenge);
+        free(sam_challenge);
     return retval;
 }

Modified: trunk/src/lib/krb5/krb/preauth2.c
===================================================================
--- trunk/src/lib/krb5/krb/preauth2.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/preauth2.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -676,13 +676,13 @@
     krb5_free_data(context, tmp);
 
     if (ret) {
-	krb5_xfree(enc_data.ciphertext.data);
+	free(enc_data.ciphertext.data);
 	return(ret);
     }
 
     ret = encode_krb5_enc_data(&enc_data, &tmp);
 
-    krb5_xfree(enc_data.ciphertext.data);
+    free(enc_data.ciphertext.data);
 
     if (ret)
 	return(ret);
@@ -699,7 +699,7 @@
 
     *out_padata = pa;
 
-    krb5_xfree(tmp);
+    free(tmp);
 
     return(0);
 }
@@ -893,7 +893,7 @@
 				   (krb5_data *)gak_data, salt, as_key);
 
 	if (defsalt.length)
-	    krb5_xfree(defsalt.data);
+	    free(defsalt.data);
 
 	if (ret) {
 	    krb5_free_sam_challenge(context, sam_challenge);
@@ -937,7 +937,7 @@
 				   &response_data, salt, as_key);
 
 	if (defsalt.length)
-	    krb5_xfree(defsalt.data);
+	    free(defsalt.data);
 
 	if (ret) {
 	    krb5_free_sam_challenge(context, sam_challenge);
@@ -958,7 +958,7 @@
     sam_response.sam_type = sam_challenge->sam_type;
     sam_response.magic = KV5M_SAM_RESPONSE;
 
-    krb5_xfree(sam_challenge);
+    free(sam_challenge);
 
     /* encode the encoded part of the response */
     if ((ret = encode_krb5_enc_sam_response_enc(&enc_sam_response_enc,
@@ -991,7 +991,7 @@
 
     *out_padata = pa;
 
-    krb5_xfree(scratch);
+    free(scratch);
 
     return(0);
 }
@@ -1458,7 +1458,7 @@
 	if (retval) {
 	   krb5_free_sam_challenge_2(context, sc2);
 	   krb5_free_sam_challenge_2_body(context, sc2b);
-	   if (defsalt.length) krb5_xfree(defsalt.data);
+	   if (defsalt.length) free(defsalt.data);
 	   return(retval);
 	}
 
@@ -1472,7 +1472,7 @@
 	   if (retval) {
 		krb5_free_sam_challenge_2(context, sc2);
 	        krb5_free_sam_challenge_2_body(context, sc2b);
-		if (defsalt.length) krb5_xfree(defsalt.data);
+		if (defsalt.length) free(defsalt.data);
 		return(retval);
 	   }
 
@@ -1483,14 +1483,14 @@
 	   if (retval) {
 		krb5_free_sam_challenge_2(context, sc2);
 	        krb5_free_sam_challenge_2_body(context, sc2b);
-		if (defsalt.length) krb5_xfree(defsalt.data);
+		if (defsalt.length) free(defsalt.data);
 		return(retval);
 	   }
 	   krb5_free_keyblock_contents(context, &tmp_kb);
 	}
 
 	if (defsalt.length)
-	   krb5_xfree(defsalt.data);
+	   free(defsalt.data);
 
    } else {
 	/* as_key = string_to_key(SAD) */
@@ -1505,7 +1505,7 @@
 				&response_data, salt, as_key);
 
 	if (defsalt.length)
-	   krb5_xfree(defsalt.data);
+	   free(defsalt.data);
 
 	if (retval) {
 	   krb5_free_sam_challenge_2(context, sc2);

Modified: trunk/src/lib/krb5/krb/rd_cred.c
===================================================================
--- trunk/src/lib/krb5/krb/rd_cred.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/rd_cred.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -42,10 +42,10 @@
 cleanup:
     if (ppart != NULL) {
 	memset(ppart, 0, sizeof(*ppart));
-	krb5_xfree(ppart);
+	free(ppart);
     }
     memset(scratch.data, 0, scratch.length);
-    krb5_xfree(scratch.data);
+    free(scratch.data);
 
     return retval;
 }
@@ -128,7 +128,7 @@
 	    goto cleanup;
 
 	pcur->ticket = *pdata;
-	krb5_xfree(pdata);
+	free(pdata);
 
 
         pcur->is_skey = FALSE;
@@ -214,10 +214,10 @@
         replay.cusec = replaydata.usec;
         replay.ctime = replaydata.timestamp;
         if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
-            krb5_xfree(replay.client);
+            free(replay.client);
             goto error;
         }
-        krb5_xfree(replay.client);
+        free(replay.client);
     }
 
     if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {

Modified: trunk/src/lib/krb5/krb/rd_priv.c
===================================================================
--- trunk/src/lib/krb5/krb/rd_priv.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/rd_priv.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -141,11 +141,11 @@
 
 cleanup_scratch:;
     memset(scratch.data, 0, scratch.length); 
-    krb5_xfree(scratch.data);
+    free(scratch.data);
 
 cleanup_privmsg:;
-    krb5_xfree(privmsg->enc_part.ciphertext.data); 
-    krb5_xfree(privmsg);
+    free(privmsg->enc_part.ciphertext.data); 
+    free(privmsg);
 
     return retval;
 }
@@ -239,10 +239,10 @@
 	replay.cusec = replaydata.usec;
 	replay.ctime = replaydata.timestamp;
 	if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
-	    krb5_xfree(replay.client);
+	    free(replay.client);
 	    goto error;
 	}
-	krb5_xfree(replay.client);
+	free(replay.client);
     }
 
     if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {
@@ -265,7 +265,7 @@
     return 0;
 
 error:;
-    krb5_xfree(outbuf->data);
+    free(outbuf->data);
     outbuf->length = 0;
     outbuf->data = NULL;
 

Modified: trunk/src/lib/krb5/krb/rd_req_dec.c
===================================================================
--- trunk/src/lib/krb5/krb/rd_req_dec.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/rd_req_dec.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -354,10 +354,10 @@
 					  &rep.msghash);
 	    if (!retval) {
 		retval = krb5_rc_store(context, (*auth_context)->rcache, &rep);
-		krb5_xfree(rep.msghash);
+		free(rep.msghash);
 	    }
-	    krb5_xfree(rep.server);
-	    krb5_xfree(rep.client);
+	    free(rep.server);
+	    free(rep.client);
 	}
 
 	if (retval)
@@ -507,10 +507,10 @@
     
 cleanup:
     if (desired_etypes != NULL)
-	krb5_xfree(desired_etypes);
+	free(desired_etypes);
     if (permitted_etypes != NULL &&
 	permitted_etypes != (*auth_context)->permitted_etypes)
-	krb5_xfree(permitted_etypes);
+	free(permitted_etypes);
     if (server == &princ_data)
 	krb5_free_default_realm(context, princ_data.realm.data);
     if (retval) {
@@ -706,7 +706,7 @@
     if (code == 0) {
 	*desired_etypes = etype_list->etypes;
 	*desired_etypes_len = etype_list->length;
-	krb5_xfree(etype_list);
+	free(etype_list);
     }
 
     if (ad_if_relevant != NULL)

Modified: trunk/src/lib/krb5/krb/rd_safe.c
===================================================================
--- trunk/src/lib/krb5/krb/rd_safe.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/rd_safe.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -245,10 +245,10 @@
 	replay.cusec = replaydata.usec;
 	replay.ctime = replaydata.timestamp;
 	if ((retval = krb5_rc_store(context, auth_context->rcache, &replay))) {
-	    krb5_xfree(replay.client);
+	    free(replay.client);
 	    goto error;
 	}
-	krb5_xfree(replay.client);
+	free(replay.client);
     }
 
     if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {
@@ -271,7 +271,7 @@
     return 0;
 
 error:
-    krb5_xfree(outbuf->data);
+    free(outbuf->data);
     return retval;
 
 }

Modified: trunk/src/lib/krb5/krb/recvauth.c
===================================================================
--- trunk/src/lib/krb5/krb/recvauth.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/recvauth.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -77,7 +77,7 @@
 	    if (strcmp(inbuf.data, sendauth_version)) {
 		problem = KRB5_SENDAUTH_BADAUTHVERS;
 	    }
-	    krb5_xfree(inbuf.data);
+	    free(inbuf.data);
 	}
 	if (flags & KRB5_RECVAUTH_BADAUTHVERS)
 	    problem = KRB5_SENDAUTH_BADAUTHVERS;
@@ -94,7 +94,7 @@
 	if (version && !problem)
 	    *version = inbuf;
 	else
-	    krb5_xfree(inbuf.data);
+	    free(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
@@ -165,7 +165,7 @@
     if (!problem) {
 	problem = krb5_rd_req(context, auth_context, &inbuf, server,
 			      keytab, &ap_option, ticket);
-	krb5_xfree(inbuf.data);
+	free(inbuf.data);
     }
 	
     /*
@@ -213,7 +213,7 @@
 
     retval = krb5_write_message(context, fd, &outbuf);
     if (outbuf.data) {
-	krb5_xfree(outbuf.data);
+	free(outbuf.data);
     	/* We sent back an error, we need cleanup then return */
     	retval = problem;
     	goto cleanup;
@@ -227,7 +227,7 @@
 	    return(retval);
 	}
 	retval = krb5_write_message(context, fd, &outbuf);
-	krb5_xfree(outbuf.data);
+	free(outbuf.data);
     }
 
 cleanup:;

Modified: trunk/src/lib/krb5/krb/send_tgs.c
===================================================================
--- trunk/src/lib/krb5/krb/send_tgs.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/send_tgs.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -103,7 +103,7 @@
 
     retval = encode_krb5_ap_req(&request, &toutbuf);
     *outbuf = *toutbuf;
-    krb5_xfree(toutbuf);
+    free(toutbuf);
 
 
     memset(request.authenticator.ciphertext.data, 0,
@@ -174,7 +174,7 @@
 					  KRB5_KEYUSAGE_TGS_REQ_AD_SESSKEY,
 					  scratch,
 					  &tgsreq.authorization_data))) {
-	    krb5_xfree(tgsreq.authorization_data.ciphertext.data);
+	    free(tgsreq.authorization_data.ciphertext.data);
 	    krb5_free_data(context, scratch);
 	    return retval;
 	}
@@ -229,7 +229,7 @@
 	for (counter = padata; *counter; counter++, i++);
 	combined_padata = malloc((i+2) * sizeof(*combined_padata));
 	if (!combined_padata) {
-	    krb5_xfree(ap_req_padata.contents);
+	    free(ap_req_padata.contents);
 	    retval = ENOMEM;
 	    goto send_tgs_error_2;
 	}
@@ -240,7 +240,7 @@
     } else {
 	combined_padata = (krb5_pa_data **)malloc(2*sizeof(*combined_padata));
 	if (!combined_padata) {
-	    krb5_xfree(ap_req_padata.contents);
+	    free(ap_req_padata.contents);
 	    retval = ENOMEM;
 	    goto send_tgs_error_2;
 	}
@@ -251,12 +251,12 @@
 
     /* the TGS_REQ is assembled in tgsreq, so encode it */
     if ((retval = encode_krb5_tgs_req(&tgsreq, &scratch))) {
-	krb5_xfree(ap_req_padata.contents);
-	krb5_xfree(combined_padata);
+	free(ap_req_padata.contents);
+	free(combined_padata);
 	goto send_tgs_error_2;
     }
-    krb5_xfree(ap_req_padata.contents);
-    krb5_xfree(combined_padata);
+    free(ap_req_padata.contents);
+    free(combined_padata);
 
     /* now send request & get response from KDC */
 send_again:
@@ -297,11 +297,11 @@
 
 send_tgs_error_1:;
     if (ktypes == NULL)
-	krb5_xfree(tgsreq.ktype);
+	free(tgsreq.ktype);
     if (tgsreq.authorization_data.ciphertext.data) {
 	memset(tgsreq.authorization_data.ciphertext.data, 0,
                tgsreq.authorization_data.ciphertext.length); 
-	krb5_xfree(tgsreq.authorization_data.ciphertext.data);
+	free(tgsreq.authorization_data.ciphertext.data);
     }
 
     return retval;

Modified: trunk/src/lib/krb5/krb/sendauth.c
===================================================================
--- trunk/src/lib/krb5/krb/sendauth.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/sendauth.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -181,12 +181,12 @@
 	if (inbuf.length) {
 		if (error) {
 		    if ((retval = krb5_rd_error(context, &inbuf, error))) {
-			krb5_xfree(inbuf.data);
+			free(inbuf.data);
 			goto error_return;
 		    }
 		}
 		retval = KRB5_SENDAUTH_REJECTED;
-		krb5_xfree(inbuf.data);
+		free(inbuf.data);
 		goto error_return;
 	}
 	
@@ -204,11 +204,11 @@
 				      &repl))) {
 		if (repl)
 		    krb5_free_ap_rep_enc_part(context, repl);
-	        krb5_xfree(inbuf.data);
+	        free(inbuf.data);
 		goto error_return;
 	    }
 
-	    krb5_xfree(inbuf.data);
+	    free(inbuf.data);
 	    /*
 	     * If the user wants to look at the AP_REP message,
 	     * copy it for him

Modified: trunk/src/lib/krb5/krb/ser_princ.c
===================================================================
--- trunk/src/lib/krb5/krb/ser_princ.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/ser_princ.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -74,7 +74,7 @@
     if ((principal = (krb5_principal) arg) &&
 	!(kret = krb5_unparse_name(kcontext, principal, &fname))) {
 	*sizep += (3*sizeof(krb5_int32)) + strlen(fname);
-	krb5_xfree(fname);
+	free(fname);
     }
     return(kret);
 }
@@ -111,7 +111,7 @@
 		*buffer = bp;
 		*lenremain = remain;
 
-		krb5_xfree(fname);
+		free(fname);
 	    }
 	}
     }

Modified: trunk/src/lib/krb5/krb/serialize.c
===================================================================
--- trunk/src/lib/krb5/krb/serialize.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/serialize.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -76,7 +76,7 @@
 	    /* Copy in new entry */
 	    memcpy(&stable[kcontext->ser_ctx_count], entry,
 		   sizeof(krb5_ser_entry));
-	    if (kcontext->ser_ctx) krb5_xfree(kcontext->ser_ctx);
+	    if (kcontext->ser_ctx) free(kcontext->ser_ctx);
 	    kcontext->ser_ctx = (void *) stable;
 	    kcontext->ser_ctx_count++;
 	}

Modified: trunk/src/lib/krb5/krb/set_realm.c
===================================================================
--- trunk/src/lib/krb5/krb/set_realm.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/set_realm.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -40,7 +40,7 @@
 	if (!newrealm)
 		return -ENOMEM;
 	
-	(void) krb5_xfree(krb5_princ_realm(context,principal)->data);
+	(void) free(krb5_princ_realm(context,principal)->data);
 
 	krb5_princ_realm(context, principal)->length = length;
 	krb5_princ_realm(context, principal)->data = newrealm;

Modified: trunk/src/lib/krb5/krb/srv_rcache.c
===================================================================
--- trunk/src/lib/krb5/krb/srv_rcache.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/srv_rcache.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -93,8 +93,8 @@
 
 cleanup:
     if (rcache)
-	krb5_xfree(rcache);
+	free(rcache);
     if (cachename)
-	krb5_xfree(cachename);
+	free(cachename);
     return retval;
 }

Modified: trunk/src/lib/krb5/krb/t_ser.c
===================================================================
--- trunk/src/lib/krb5/krb/t_ser.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/t_ser.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -128,7 +128,7 @@
 		    if (verbose)
 			printf("%s: compare succeeded\n", msg);
 		}
-		krb5_xfree(outrep2);
+		free(outrep2);
 	    }
 	    else
 		printf("%s: second externalize returned %d\n", msg, kret);
@@ -144,7 +144,7 @@
 
 		    actx = (krb5_auth_context) nctx;
 		    if (actx->i_vector)
-			krb5_xfree(actx->i_vector);
+			free(actx->i_vector);
 		}
 		krb5_auth_con_free(ser_ctx, (krb5_auth_context) nctx);
 		break;
@@ -164,11 +164,11 @@
 		    eblock = (krb5_encrypt_block *) nctx;
 #if 0
 		    if (eblock->priv && eblock->priv_size)
-			krb5_xfree(eblock->priv);
+			free(eblock->priv);
 #endif
 		    if (eblock->key)
 			krb5_free_keyblock(ser_ctx, eblock->key);
-		    krb5_xfree(eblock);
+		    free(eblock);
 		}
 		break;
 	    case KV5M_PRINCIPAL:
@@ -184,7 +184,7 @@
 	}
 	else
 	    printf("%s: internalize returned %d\n", msg, kret);
-	krb5_xfree(outrep);
+	free(outrep);
     }
     else
 	printf("%s: externalize_data returned %d\n", msg, kret);
@@ -307,7 +307,7 @@
 		!(kret = ser_data(verbose, "> Auth context with new vector",
 				  (krb5_pointer) actx,
 				  KV5M_AUTH_CONTEXT)) &&
-		(krb5_xfree(actx->i_vector), actx->i_vector) &&
+		(free(actx->i_vector), actx->i_vector) &&
 		!(kret = krb5_auth_con_setivector(kcontext, actx,
 						  (krb5_pointer) print_erep)
 		  ) &&

Modified: trunk/src/lib/krb5/krb/vfy_increds.c
===================================================================
--- trunk/src/lib/krb5/krb/vfy_increds.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/krb/vfy_increds.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -226,7 +226,7 @@
    if (authcon)
       krb5_auth_con_free(context, authcon);
    if (ap_req.data)
-      krb5_xfree(ap_req.data);
+      free(ap_req.data);
 
    return(ret);
 }

Modified: trunk/src/lib/krb5/os/an_to_ln.c
===================================================================
--- trunk/src/lib/krb5/os/an_to_ln.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/os/an_to_ln.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -115,13 +115,13 @@
 
     db = KDBM_OPEN(dbname, O_RDONLY, 0600);
     if (!db) {
-	krb5_xfree(princ_name);
+	free(princ_name);
 	return KRB5_LNAME_CANTOPEN;
     }
 
     contents = KDBM_FETCH(db, key);
 
-    krb5_xfree(princ_name);
+    free(princ_name);
 
     if (contents.dptr == NULL) {
 	retval = KRB5_LNAME_NOTRANS;
@@ -583,7 +583,7 @@
 	    if (!(selstring = aname_full_to_mapping_name(fprincname)))
 		kret = ENOMEM;
 	}
-	krb5_xfree(fprincname);
+	free(fprincname);
     }
     if (!kret) {
 	/*
@@ -819,9 +819,9 @@
 	    }
 	    else
 		kret = ENOMEM;
-	    krb5_xfree(pname);
+	    free(pname);
 	}
-	krb5_xfree(realm);
+	free(realm);
     }
     return(kret);
 }

Modified: trunk/src/lib/krb5/os/free_krbhs.c
===================================================================
--- trunk/src/lib/krb5/os/free_krbhs.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/os/free_krbhs.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -40,6 +40,6 @@
 
     for (cp = hostlist; *cp; cp++)
 	free(*cp);
-    krb5_xfree(hostlist);
+    free((char *)hostlist);
     return 0;
 }

Modified: trunk/src/lib/krb5/os/full_ipadr.c
===================================================================
--- trunk/src/lib/krb5/os/full_ipadr.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/os/full_ipadr.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -53,7 +53,7 @@
 	2*sizeof(temptype) + 2*sizeof(templength);
 
     if (!(retaddr->contents = (krb5_octet *)malloc(retaddr->length))) {
-	krb5_xfree(retaddr);
+	free(retaddr);
 	return ENOMEM;
     }
     marshal = retaddr->contents;

Modified: trunk/src/lib/krb5/os/localaddr.c
===================================================================
--- trunk/src/lib/krb5/os/localaddr.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/os/localaddr.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -1358,7 +1358,7 @@
 	int i;
 	if (data.addr_temp) {
 	    for (i = 0; i < data.count; i++)
-		krb5_xfree (data.addr_temp[i]);
+		free (data.addr_temp[i]);
 	    free (data.addr_temp);
 	}
 	if (data.mem_err)

Modified: trunk/src/lib/krb5/os/locate_kdc.c
===================================================================
--- trunk/src/lib/krb5/os/locate_kdc.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/os/locate_kdc.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -337,7 +337,7 @@
 		 error_message(code));
         if (code == PROF_NO_SECTION || code == PROF_NO_RELATION)
 	    code = KRB5_REALM_UNKNOWN;
- 	krb5_xfree(host);
+ 	free(host);
   	return code;
      }
 
@@ -348,7 +348,7 @@
     
     if (count == 0) {
         profile_free_list(hostlist);
-	krb5_xfree(host);
+	free(host);
 	addrlist->naddrs = 0;
 	return 0;
     }
@@ -362,7 +362,7 @@
 	code = profile_get_values(context->profile, realm_srv_names,
 				  &masterlist);
 
-	krb5_xfree(host);
+	free(host);
 
 	if (code == 0) {
 	    for (i=0; masterlist[i]; i++) {
@@ -383,7 +383,7 @@
 	    }
 	}
     } else {
-	krb5_xfree(host);
+	free(host);
     }
 
     /* at this point, if master is non-NULL, then either the master kdc

Modified: trunk/src/lib/krb5/os/read_msg.c
===================================================================
--- trunk/src/lib/krb5/os/read_msg.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/os/read_msg.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -57,7 +57,7 @@
 			return(ENOMEM);
 		}
 		if ((len2 = krb5_net_read(context, fd, buf, ilen)) != ilen) {
-			krb5_xfree(buf);
+			free(buf);
 			return((len2 < 0) ? errno : ECONNABORTED);
 		}
 	}

Modified: trunk/src/lib/krb5/os/sn2princ.c
===================================================================
--- trunk/src/lib/krb5/os/sn2princ.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/os/sn2princ.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -187,7 +187,7 @@
 
 	if (!hrealms[0]) {
 	    free(remote_host);
-	    krb5_xfree(hrealms);
+	    free(hrealms);
 	    return KRB5_ERR_HOST_REALM_UNKNOWN;
 	}
 	realm = hrealms[0];

Modified: trunk/src/lib/krb5/rcache/rc_dfl.c
===================================================================
--- trunk/src/lib/krb5/rcache/rc_dfl.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/lib/krb5/rcache/rc_dfl.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -334,10 +334,10 @@
 cleanup:
     if (t) {
         if (t->name)
-            krb5_xfree(t->name);
+            free(t->name);
         if (t->h)
-            krb5_xfree(t->h);
-        krb5_xfree(t);
+            free(t->h);
+        free(t);
     }
     return retval;
 }
@@ -523,11 +523,11 @@
 
 errout:
     if (rep->client)
-        krb5_xfree(rep->client);
+        free(rep->client);
     if (rep->server)
-        krb5_xfree(rep->server);
+        free(rep->server);
     if (rep->msghash)
-        krb5_xfree(rep->msghash);
+        free(rep->msghash);
     rep->client = rep->server = 0;
     return retval;
 }

Modified: trunk/src/tests/asn.1/krb5_decode_test.c
===================================================================
--- trunk/src/tests/asn.1/krb5_decode_test.c	2009-01-27 23:31:19 UTC (rev 21811)
+++ trunk/src/tests/asn.1/krb5_decode_test.c	2009-01-28 00:04:15 UTC (rev 21812)
@@ -642,7 +642,7 @@
 	setup(krb5_cred_enc_part,"krb5_cred_enc_part",ktest_make_sample_cred_enc_part);
 	decode_run("enc_cred_part","","7D 82 02 23 30 82 02 1F A0 82 01 DA 30 82 01 D6 30 81 E8 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 A3 07 03 05 00 FE DC BA 98 A4 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A8 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A9 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 AA 20 30 1E 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 81 E8 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 
 72 61 A3 07 03 05 00 FE DC BA 98 A4 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A8 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A9 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 AA 20 30 1E 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 A1 03 02 01 2A A2 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A3 05 02 03 01 E2 40 A4 0F 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 A5 0F 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23",decode_krb5_enc_cred_part,ktest_equal_enc_cred_part,krb5_free_cred_enc_part);
 	/* free_cred_enc_part does not free the pointer */
-	krb5_xfree(var);
+	free(var);
 	ktest_destroy_principal(&(ref.ticket_info[0]->client));
 	ktest_destroy_principal(&(ref.ticket_info[0]->server));
 	ref.ticket_info[0]->flags = 0;
@@ -658,7 +658,7 @@
 	ktest_destroy_address(&(ref.r_address));
 	decode_run("enc_cred_part","(optionals NULL)","7D 82 01 0E 30 82 01 0A A0 82 01 06 30 82 01 02 30 15 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 30 81 E8 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 A3 07 03 05 00 FE DC BA 98 A4 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A8 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A9 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 AA 20 30 1E 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23",decode_krb5_enc_cred_part,ktest_equal_enc_cred_part,krb5_free_cred_enc_part);
 	/* free_cred_enc_part does not free the pointer */
-	krb5_xfree(var);
+	free(var);
 
 	ktest_empty_cred_enc_part(&ref);
     }
@@ -895,8 +895,8 @@
 void krb5_ktest_free_alt_method(krb5_context context, krb5_alt_method *val)
 {
     if (val->data)
-	krb5_xfree(val->data);
-    krb5_xfree(val);
+	free(val->data);
+    free(val);
 }
 
 void krb5_ktest_free_pwd_sequence(krb5_context context, 
@@ -904,7 +904,7 @@
 {
     krb5_free_data(context, val->passwd);
     krb5_free_data(context, val->phrase);
-    krb5_xfree(val);
+    free(val);
 }
 
 void krb5_ktest_free_enc_data(krb5_context context, krb5_enc_data *val)




More information about the cvs-krb5 mailing list