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

176 files changed:
src/admin/convert/kdb5_convert.c
src/admin/create/kdb5_create.c
src/admin/edit/dump.c
src/admin/edit/kdb5_edit.c
src/appl/bsd/forward.c
src/appl/bsd/kcmd.c
src/appl/bsd/krcp.c
src/appl/bsd/krlogind.c
src/appl/bsd/krshd.c
src/appl/simple/client/sim_client.c
src/appl/simple/server/sim_server.c
src/appl/telnet/libtelnet/forward.c
src/config/ultrix.cf
src/include/krb5/free.h
src/include/krb5/func-proto.h
src/kadmin/server/adm_funcs.c
src/krb524/krb524d.c
src/lib/crypto/des/fin_rndkey.c
src/lib/crypto/des/new_rn_key.c
src/lib/crypto/des/random_key.c
src/lib/crypto/des/string2key.c
src/lib/des425/string2key.c
src/lib/gssapi/acc_sec.c
src/lib/gssapi/init_sec.c
src/lib/gssapi/rel_cred.c
src/lib/gssapi/seal.c
src/lib/gssapi/sign.c
src/lib/gssapi/verify.c
src/lib/kdb/decrypt_key.c
src/lib/kdb/encrypt_key.c
src/lib/kdb/fetch_mkey.c
src/lib/kdb/kdb_dbm.c
src/lib/kdb/verify_mky.c
src/lib/krb425/mk_priv.c
src/lib/krb425/mk_req.c
src/lib/krb425/mk_safe.c
src/lib/krb425/rd_priv.c
src/lib/krb425/rd_safe.c
src/lib/krb425/set_key.c
src/lib/krb5/asn.1/adat2kadat.c
src/lib/krb5/asn.1/addr2kaddr.c
src/lib/krb5/asn.1/adr2kadr.c
src/lib/krb5/asn.1/aprp2kaprp.c
src/lib/krb5/asn.1/aprq2kaprq.c
src/lib/krb5/asn.1/arep2karep.c
src/lib/krb5/asn.1/auth2kauth.c
src/lib/krb5/asn.1/ck2kck.c
src/lib/krb5/asn.1/cred2kcred.c
src/lib/krb5/asn.1/edat2kedat.c
src/lib/krb5/asn.1/ekrp2kekrp.c
src/lib/krb5/asn.1/enck2kkey.c
src/lib/krb5/asn.1/encode.c
src/lib/krb5/asn.1/err2kerr.c
src/lib/krb5/asn.1/etpt2ketpt.c
src/lib/krb5/asn.1/kadat2adat.c
src/lib/krb5/asn.1/kaddr2addr.c
src/lib/krb5/asn.1/kadr2adr.c
src/lib/krb5/asn.1/kaprp2aprp.c
src/lib/krb5/asn.1/kaprq2aprq.c
src/lib/krb5/asn.1/karep2arep.c
src/lib/krb5/asn.1/kcred2cred.c
src/lib/krb5/asn.1/kdcr2kkdcr.c
src/lib/krb5/asn.1/kedat2edat.c
src/lib/krb5/asn.1/kekrp2ekrp.c
src/lib/krb5/asn.1/kerr2err.c
src/lib/krb5/asn.1/ketpt2etpt.c
src/lib/krb5/asn.1/kprep2prep.c
src/lib/krb5/asn.1/kpriv2priv.c
src/lib/krb5/asn.1/kpwds2pwds.c
src/lib/krb5/asn.1/ksafe2safe.c
src/lib/krb5/asn.1/ktgrq2tgrq.c
src/lib/krb5/asn.1/prep2kprep.c
src/lib/krb5/asn.1/prin2kprin.c
src/lib/krb5/asn.1/priv2kpriv.c
src/lib/krb5/asn.1/pwd2kpwd.c
src/lib/krb5/asn.1/pwds2kpwds.c
src/lib/krb5/asn.1/qbuf2data.c
src/lib/krb5/asn.1/safe2ksafe.c
src/lib/krb5/asn.1/tgrq2ktgrq.c
src/lib/krb5/asn.1/tkt2ktkt.c
src/lib/krb5/asn.1/tran2ktran.c
src/lib/krb5/ccache/file/fcc_close.c
src/lib/krb5/ccache/file/fcc_eseq.c
src/lib/krb5/ccache/file/fcc_gennew.c
src/lib/krb5/ccache/file/fcc_read.c
src/lib/krb5/ccache/file/fcc_reslv.c
src/lib/krb5/ccache/file/fcc_sseq.c
src/lib/krb5/ccache/stdio/scc_close.c
src/lib/krb5/ccache/stdio/scc_eseq.c
src/lib/krb5/ccache/stdio/scc_gennew.c
src/lib/krb5/ccache/stdio/scc_read.c
src/lib/krb5/ccache/stdio/scc_reslv.c
src/lib/krb5/free/f_addr.c
src/lib/krb5/free/f_address.c
src/lib/krb5/free/f_ap_rep.c
src/lib/krb5/free/f_ap_req.c
src/lib/krb5/free/f_arep_enc.c
src/lib/krb5/free/f_authdata.c
src/lib/krb5/free/f_authent.c
src/lib/krb5/free/f_cksum.c
src/lib/krb5/free/f_cred.c
src/lib/krb5/free/f_cred_cnt.c
src/lib/krb5/free/f_cred_enc.c
src/lib/krb5/free/f_creds.c
src/lib/krb5/free/f_enc_kdc.c
src/lib/krb5/free/f_enc_tkt.c
src/lib/krb5/free/f_error.c
src/lib/krb5/free/f_kdc_rep.c
src/lib/krb5/free/f_kdc_req.c
src/lib/krb5/free/f_keyblock.c
src/lib/krb5/free/f_last_req.c
src/lib/krb5/free/f_padata.c
src/lib/krb5/free/f_princ.c
src/lib/krb5/free/f_priv.c
src/lib/krb5/free/f_priv_enc.c
src/lib/krb5/free/f_pwd_data.c
src/lib/krb5/free/f_pwd_seq.c
src/lib/krb5/free/f_safe.c
src/lib/krb5/free/f_tgt_cred.c
src/lib/krb5/free/f_ticket.c
src/lib/krb5/free/f_tickets.c
src/lib/krb5/free/f_tkt_auth.c
src/lib/krb5/keytab/file/ktf_close.c
src/lib/krb5/keytab/file/ktf_endget.c
src/lib/krb5/keytab/file/ktf_get_en.c
src/lib/krb5/keytab/file/ktf_next.c
src/lib/krb5/keytab/file/ktf_resolv.c
src/lib/krb5/keytab/file/ktf_wreslv.c
src/lib/krb5/keytab/ktfr_entry.c
src/lib/krb5/krb/bld_pr_ext.c
src/lib/krb5/krb/bld_princ.c
src/lib/krb5/krb/copy_addrs.c
src/lib/krb5/krb/copy_athctr.c
src/lib/krb5/krb/copy_auth.c
src/lib/krb5/krb/copy_cksum.c
src/lib/krb5/krb/copy_creds.c
src/lib/krb5/krb/copy_data.c
src/lib/krb5/krb/copy_key.c
src/lib/krb5/krb/copy_tick.c
src/lib/krb5/krb/encode_kdc.c
src/lib/krb5/krb/encrypt_tk.c
src/lib/krb5/krb/free_rtree.c
src/lib/krb5/krb/gc_2tgt.c
src/lib/krb5/krb/gc_via_tgt.c
src/lib/krb5/krb/gen_seqnum.c
src/lib/krb5/krb/gen_subkey.c
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/in_tkt_pwd.c
src/lib/krb5/krb/in_tkt_sky.c
src/lib/krb5/krb/mk_error.c
src/lib/krb5/krb/mk_priv.c
src/lib/krb5/krb/mk_rep.c
src/lib/krb5/krb/mk_safe.c
src/lib/krb5/krb/parse.c
src/lib/krb5/krb/rd_priv.c
src/lib/krb5/krb/rd_req_dec.c
src/lib/krb5/krb/rd_req_sim.c
src/lib/krb5/krb/rd_safe.c
src/lib/krb5/krb/recvauth.c
src/lib/krb5/krb/send_tgs.c
src/lib/krb5/krb/sendauth.c
src/lib/krb5/krb/srv_rcache.c
src/lib/krb5/krb/walk_rtree.c
src/lib/krb5/os/an_to_ln.c
src/lib/krb5/os/free_krbhs.c
src/lib/krb5/os/full_ipadr.c
src/lib/krb5/os/get_krbhst.c
src/lib/krb5/os/hst_realm.c
src/lib/krb5/os/localaddr.c
src/lib/krb5/os/read_msg.c
src/lib/krb5/os/read_pwd.c
src/lib/krb5/os/sendto_kdc.c
src/lib/krb5/os/sn2princ.c
src/slave/kprop.c
src/slave/kpropd.c
src/tests/hammer/kdc5_hammer.c

index 2168e625e3dcc7ae15ff329c16e48031a24ac7c5..02e9fb082f82c8741ef3e0c32b20769143dfbc89 100644 (file)
@@ -563,7 +563,7 @@ Principal *princ;
 
     krb5_free_principal(entry.principal);
     krb5_free_principal(entry.mod_name);
-    xfree(ekey.contents);
+    krb5_xfree(ekey.contents);
 
     return retval;
 }
@@ -622,7 +622,7 @@ struct realm_info *pblock;
     if (retval = krb5_db_put_principal(&entry, &nentries))
        return retval;
 
-    xfree(ekey.contents);
+    krb5_xfree(ekey.contents);
     return 0;
 }
 
index a535a2aad153c3285d70be92bf7b4b78d19296dd..113d59988d47d9f551a43ed38bc4b7339958a3a9 100644 (file)
@@ -338,6 +338,6 @@ struct realm_info *pblock;
     if (retval = krb5_db_put_principal(&entry, &nentries))
        return retval;
 
-    xfree(ekey.contents);
+    krb5_xfree(ekey.contents);
     return 0;
 }
index 2118c1e585ecb906341fb448044f140c09fe20c3..e487407c54b2b5aaa0fe683fa856c144e1e0c5de 100644 (file)
@@ -437,13 +437,13 @@ void load_db(argc, argv)
                free(name);
                free(mod_name);
                if (entry.key.contents)
-                   xfree(entry.key.contents);
+                   krb5_xfree(entry.key.contents);
                if (entry.alt_key.contents)
-                   xfree(entry.alt_key.contents);
+                   krb5_xfree(entry.alt_key.contents);
                if (entry.salt)
-                   xfree(entry.salt);
+                   krb5_xfree(entry.salt);
                if (entry.alt_salt)
-                   xfree(entry.alt_salt);
+                   krb5_xfree(entry.alt_salt);
        }
 error_out:
        if (retval = krb5_db_fini()) {
index 3afa25ef6a82e54a6e0b75b92a523a9be5f6d995..c8d80426c52eae8241201f90dc559cfbedb426c0 100644 (file)
@@ -414,7 +414,7 @@ OLDDECLARG(struct saltblock *, salt)
     if (retval = krb5_timeofday(&newentry.mod_date)) {
        com_err(cmdname, retval, "while fetching date");
        memset((char *)newentry.key.contents, 0, newentry.key.length);
-       xfree(newentry.key.contents);
+       krb5_xfree(newentry.key.contents);
        return;
     }
     newentry.attributes = mblock.flags;
@@ -430,7 +430,7 @@ OLDDECLARG(struct saltblock *, salt)
     
     retval = krb5_db_put_principal(&newentry, &one);
     memset((char *)newentry.key.contents, 0, newentry.key.length);
-    xfree(newentry.key.contents);
+    krb5_xfree(newentry.key.contents);
     if (retval) {
        com_err(cmdname, retval, "while storing entry for '%s'\n", newprinc);
        return;
@@ -465,7 +465,7 @@ krb5_pointer infop;
                                              &master_random);
                memset((char *)master_keyblock.contents, 0,
                       master_keyblock.length);
-               xfree(master_keyblock.contents);
+               krb5_xfree(master_keyblock.contents);
                master_keyblock.contents = NULL;
        }
        krb5_free_principal(master_princ);
@@ -554,7 +554,7 @@ char *dbname;
                                           &master_encblock)) {
        com_err(pname, retval, "while verifying master key");
        memset((char *)master_keyblock.contents, 0, master_keyblock.length);
-       xfree(master_keyblock.contents);
+       krb5_xfree(master_keyblock.contents);
        valid_master_key = 0;
        dbactive = TRUE;
        return(1);
@@ -563,7 +563,7 @@ char *dbname;
                                  &master_keyblock)) {
        com_err(pname, retval, "while processing master key");
        memset((char *)master_keyblock.contents, 0, master_keyblock.length);
-       xfree(master_keyblock.contents);
+       krb5_xfree(master_keyblock.contents);
        valid_master_key = 0;
        dbactive = TRUE;
        return(1);
@@ -574,7 +574,7 @@ char *dbname;
        com_err(pname, retval, "while initializing random key generator");
        (void) krb5_finish_key(&master_encblock);
        memset((char *)master_keyblock.contents, 0, master_keyblock.length);
-       xfree(master_keyblock.contents);
+       krb5_xfree(master_keyblock.contents);
        valid_master_key = 0;
        dbactive = TRUE;
        return(1);
@@ -729,7 +729,7 @@ char *argv[];
            printf("'%s' added to keytab '%s'\n",
                   pname, ktname);
        memset((char *)newentry.key.contents, 0, newentry.key.length);
-       xfree(newentry.key.contents);
+       krb5_xfree(newentry.key.contents);
     cleanall:
            krb5_db_free_principal(&dbentry, nentries);
     cleanmost:
@@ -831,7 +831,7 @@ char *argv[];
        if (key.keytype != 1) {
                com_err(argv[0], 0, "%s does not have a DES key!", pname);
                memset((char *)key.contents, 0, key.length);
-               xfree(key.contents);
+               krb5_xfree(key.contents);
                continue;
        }
        fwrite(argv[i], strlen(argv[i]) + 1, 1, fout); /* p.name */
@@ -841,7 +841,7 @@ char *argv[];
        fwrite((char *)key.contents, 8, 1, fout);
        printf("'%s' added to V4 srvtab '%s'\n", pname, ktname);
        memset((char *)key.contents, 0, key.length);
-       xfree(key.contents);
+       krb5_xfree(key.contents);
     cleanall:
            krb5_db_free_principal(&dbentry, nentries);
     cleanmost:
@@ -1207,7 +1207,7 @@ OLDDECLARG(int, salttype)
            return;
        }
        salt.saltdata = *foo;
-       xfree(foo);
+       krb5_xfree(foo);
        break;
     }
     default:
@@ -1222,14 +1222,14 @@ OLDDECLARG(int, salttype)
     if (retval) {
        com_err(cmdname, retval, "while converting password to key for '%s'",
                newprinc);
-       xfree(salt.saltdata.data);
+       krb5_xfree(salt.saltdata.data);
        return;
     }
     add_key(cmdname, newprinc, princ, &tempkey, ++vno,
            (salttype == KRB5_KDB_SALTTYPE_NORMAL) ? 0 : &salt);
-    xfree(salt.saltdata.data);
+    krb5_xfree(salt.saltdata.data);
     memset((char *)tempkey.contents, 0, tempkey.length);
-    xfree(tempkey.contents);
+    krb5_xfree(tempkey.contents);
     return;
 }
 
index cef8ec6faf2439579e1230066f003333edcf8df6..c8f9c505a28202fb0dce2a349304977707ac3684 100644 (file)
@@ -87,7 +87,7 @@ get_for_creds(etype, sumtype, rhost, client, enc_key, forwardable, outbuf)
     }
     if (!hrealms[0]) {
        free(remote_host);
-       xfree(hrealms);
+       krb5_xfree(hrealms);
        return KRB5_ERR_HOST_REALM_UNKNOWN;
     }
 
@@ -313,7 +313,7 @@ krb5_data *outbuf;
     if (!(scratch->data = realloc(scratch->data,
                                  ret_cred.enc_part.ciphertext.length))) {
        /* may destroy scratch->data */
-       xfree(scratch);
+       krb5_xfree(scratch);
        return ENOMEM;
     }
     memset(scratch->data + scratch->length, 0,
@@ -363,7 +363,7 @@ krb5_data *outbuf;
     cleanup_encpart();
 
     *outbuf = *scratch;
-    xfree(scratch);
+    krb5_xfree(scratch);
     return 0;
 
  clean_prockey:
@@ -455,14 +455,14 @@ const krb5_address *recv_addr;    /* optional */
        return retval;
     }
     
-#define cleanup_credmsg() {(void)xfree(credmsg->enc_part.ciphertext.data); (void)xfree(credmsg);}
+#define cleanup_credmsg() {(void)krb5_xfree(credmsg->enc_part.ciphertext.data); (void)krb5_xfree(credmsg);}
 
     if (!(scratch = (krb5_data *) malloc(sizeof(*scratch)))) {
        cleanup_credmsg();
        return ENOMEM;
     }
 
-#define cleanup_scratch() {(void)memset(scratch->data, 0, scratch->length); (void)xfree(scratch->data);}
+#define cleanup_scratch() {(void)memset(scratch->data, 0, scratch->length); (void)krb5_xfree(scratch->data);}
 
     if (retval = encode_krb5_ticket(credmsg->tickets[0], &scratch)) {
        cleanup_credmsg();
@@ -472,7 +472,7 @@ const krb5_address *recv_addr;    /* optional */
 
     creds->ticket = *scratch;
     if (!(creds->ticket.data = malloc(scratch->length))) {
-       xfree(creds->ticket.data);
+       krb5_xfree(creds->ticket.data);
        return ENOMEM;
     }
     memcpy((char *)creds->ticket.data, (char *) scratch->data, scratch->length);
@@ -530,7 +530,7 @@ const krb5_address *recv_addr;    /* optional */
     }
     cleanup_scratch();
 
-#define cleanup_mesg() {(void)xfree(credmsg_enc_part);}
+#define cleanup_mesg() {(void)krb5_xfree(credmsg_enc_part);}
 
     if (retval = krb5_timeofday(&currenttime)) {
        cleanup_mesg();
index 4dab0f2592ead45ace33143fe878eb27ef1332ae..5e27f5cc0173acecb7fdb9005e934795930131eb 100644 (file)
@@ -163,8 +163,8 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
 #ifndef sgi
            sigsetmask(oldmask);
 #endif
-           if (tmpstr) xfree(tmpstr);
-           if (host_save) xfree(host_save);
+           if (tmpstr) krb5_xfree(tmpstr);
+           if (host_save) krb5_xfree(host_save);
            krb5_free_creds(ret_cred);
            return (-1);
        }
@@ -211,8 +211,8 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
 #ifndef sgi
        sigsetmask(oldmask);
 #endif
-       if (tmpstr) xfree(tmpstr);
-       if (host_save) xfree(host_save);
+       if (tmpstr) krb5_xfree(tmpstr);
+       if (host_save) krb5_xfree(host_save);
        krb5_free_creds(ret_cred);
        return (-1);
     }
@@ -373,8 +373,8 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
     sigsetmask(oldmask);
 #endif
     *sock = s;
-    if (tmpstr) xfree(tmpstr);
-    if (host_save) xfree(host_save);
+    if (tmpstr) krb5_xfree(tmpstr);
+    if (host_save) krb5_xfree(host_save);
     
     /* pass back credentials if wanted */
     if (cred) krb5_copy_creds(ret_cred,cred);
@@ -391,8 +391,8 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
 #ifndef sgi
     sigsetmask(oldmask);
 #endif
-    if (tmpstr) xfree(tmpstr);
-    if (host_save) xfree(host_save);
+    if (tmpstr) krb5_xfree(tmpstr);
+    if (host_save) krb5_xfree(host_save);
     if (ret_cred)
       krb5_free_creds(ret_cred);
     return (status);
index e92549e80b96c3859a4dc524fbcebe1d3f3dce0e..ec0807a3913d33dc55bf13e118f8c57d5ac4189b 100644 (file)
@@ -1157,7 +1157,7 @@ void send_auth()
                error_message(status));
        exit(1);
     }
-    xfree(princ);
+    krb5_xfree(princ);
     status = krb5_write_message((krb5_pointer) &rem, &creds.ticket);
     if (status){
        fprintf(stderr,
@@ -1189,7 +1189,7 @@ void send_auth()
                                                  keyproc */
                         0,               /* no rcache for the moment XXX */
                         &authdat);
-    xfree(reply.data);
+    krb5_xfree(reply.data);
     if (status) {
        fprintf(stderr, "rcp: send_auth failed krb5_rd_req: %s\n",
                error_message(status));
@@ -1248,7 +1248,7 @@ void
        krb5_cc_close(cc);
        exit(1);
     }
-    xfree(pname_data.data);
+    krb5_xfree(pname_data.data);
     
     if (status = krb5_get_credentials(KRB5_GC_USER_USER, cc, &creds)){
        krb5_cc_destroy(cc);
@@ -1272,7 +1272,7 @@ void
     krb5_cc_destroy(cc);
     krb5_cc_close(cc);
     status = krb5_write_message((krb5_pointer) &rem, &msg);
-    xfree(msg.data);
+    krb5_xfree(msg.data);
     if (status){
        exit(1);
     }
index 49a3793b87431c53ac84abc3f67e773c8f5abc44..76a344ab287907bb1ea2128aea388a695e87e586 100644 (file)
@@ -1456,16 +1456,16 @@ recvauth()
        
        if ((len = krb5_net_read(netf, inbuf.data, inbuf.length)) !=
            inbuf.length) {
-           xfree(inbuf.data);
+           krb5_xfree(inbuf.data);
            return((len < 0) ? errno : ECONNABORTED);
        }
 
        if (strcmp(inbuf.data, "KRB5_SENDAUTH_V1.0")) {
-           xfree(inbuf.data);
+           krb5_xfree(inbuf.data);
            status = KRB5_SENDAUTH_BADAUTHVERS;
            return status;
        }
-       xfree(inbuf.data);
+       krb5_xfree(inbuf.data);
 
 #ifdef unicos61
 #define SIZEOF_INADDR  SIZEOF_in_addr
@@ -1714,11 +1714,11 @@ v5_recvauth(/* IN */
     if (retval = krb5_read_message(fd, &inbuf))
       return(retval);
     if (strcmp(inbuf.data, appl_version)) {
-       xfree(inbuf.data);
+       krb5_xfree(inbuf.data);
        if (!problem)
          problem = KRB5_SENDAUTH_BADAPPLVERS;
     }
-    xfree(inbuf.data);
+    krb5_xfree(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
@@ -1806,7 +1806,7 @@ v5_recvauth(/* IN */
     if (!problem)
       problem = krb5_rd_req(&inbuf, server, sender_addr, fetch_from,
                            keyproc, keyprocarg, rcache, &authdat);
-    xfree(inbuf.data);
+    krb5_xfree(inbuf.data);
 #ifdef WORKING_RCACHE
     if (rcache)
       retval = krb5_rc_close(rcache);
@@ -1849,7 +1849,7 @@ v5_recvauth(/* IN */
     }
     if (retval = krb5_write_message(fd, &outbuf)) {
        if (outbuf.data)
-         xfree(outbuf.data);
+         krb5_xfree(outbuf.data);
        if (!problem)
          krb5_free_tkt_authent(authdat);
        return(retval);
@@ -1894,11 +1894,11 @@ v5_recvauth(/* IN */
            return(retval);
        }
        if (retval = krb5_write_message(fd, &outbuf)) {
-           xfree(outbuf.data);
+           krb5_xfree(outbuf.data);
            krb5_free_tkt_authent(authdat);
            return(retval);
        }
-       xfree(outbuf.data);
+       krb5_xfree(outbuf.data);
     }
     /*
      * At this point, we've won.  We just need to copy whatever
@@ -1928,7 +1928,7 @@ v5_recvauth(/* IN */
       *authent = authdat->authenticator;
     else
       krb5_free_authenticator(authdat->authenticator);
-    xfree(authdat);
+    krb5_xfree(authdat);
     return 0;
 }
 
index 98f44a57c238390723345c7886024f1d07c51b29..8ea3840199592d6791a374a8e78e4258fc915380 100644 (file)
@@ -1468,16 +1468,16 @@ recvauth(netf, peersin, peeraddr)
        
        if ((len = krb5_net_read(netf, inbuf.data, inbuf.length)) !=
            inbuf.length) {
-           xfree(inbuf.data);
+           krb5_xfree(inbuf.data);
            return((len < 0) ? errno : ECONNABORTED);
        }
 
        if (strcmp(inbuf.data, "KRB5_SENDAUTH_V1.0")) {
-           xfree(inbuf.data);
+           krb5_xfree(inbuf.data);
            status = KRB5_SENDAUTH_BADAUTHVERS;
            return status;
        }
-       xfree(inbuf.data);
+       krb5_xfree(inbuf.data);
 
 #ifdef unicos61
 #define SIZEOF_INADDR  SIZEOF_in_addr
@@ -1708,11 +1708,11 @@ v5_recvauth(/* IN */
     if (retval = krb5_read_message(fd, &inbuf))
       return(retval);
     if (strcmp(inbuf.data, appl_version)) {
-       xfree(inbuf.data);
+       krb5_xfree(inbuf.data);
        if (!problem)
          problem = KRB5_SENDAUTH_BADAPPLVERS;
     }
-    xfree(inbuf.data);
+    krb5_xfree(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
@@ -1800,7 +1800,7 @@ v5_recvauth(/* IN */
     if (!problem)
       problem = krb5_rd_req(&inbuf, server, sender_addr, fetch_from,
                            keyproc, keyprocarg, rcache, &authdat);
-    xfree(inbuf.data);
+    krb5_xfree(inbuf.data);
 #ifdef WORKING_RCACHE
     if (rcache)
       retval = krb5_rc_close(rcache);
@@ -1843,7 +1843,7 @@ v5_recvauth(/* IN */
     }
     if (retval = krb5_write_message(fd, &outbuf)) {
        if (outbuf.data)
-         xfree(outbuf.data);
+         krb5_xfree(outbuf.data);
        if (!problem)
          krb5_free_tkt_authent(authdat);
        return(retval);
@@ -1889,11 +1889,11 @@ v5_recvauth(/* IN */
            return(retval);
        }
        if (retval = krb5_write_message(fd, &outbuf)) {
-           xfree(outbuf.data);
+           krb5_xfree(outbuf.data);
            krb5_free_tkt_authent(authdat);
            return(retval);
        }
-       xfree(outbuf.data);
+       krb5_xfree(outbuf.data);
     }
     
     /*
@@ -1924,7 +1924,7 @@ v5_recvauth(/* IN */
       *authent = authdat->authenticator;
     else
       krb5_free_authenticator(authdat->authenticator);
-    xfree(authdat);
+    krb5_xfree(authdat);
     return 0;
 }
 
index 6fbfac25a48c84b99bcb04597f4ad3a1157ac028..a9a713ed3c8c671e2753fe0ed41d2460233d3e96 100644 (file)
@@ -221,7 +221,7 @@ char *argv[];
        com_err(PROGNAME, errno, "while sending KRB_AP_REQ message");
     printf("Sent authentication data: %d bytes\n", i);
 
-    xfree(packet.data);
+    krb5_xfree(packet.data);
     /* PREPARE KRB_SAFE MESSAGE */
 
     /* Get my address */
@@ -252,12 +252,12 @@ char *argv[];
        exit(1);
     }
     if (retval = krb5_rc_resolve_type(&rcache, krb5_rc_default_type())) {
-       xfree(rcache);
+       krb5_xfree(rcache);
        com_err(PROGNAME, retval, "while resolving replay cache type");
        exit(1);
     }
     if (retval = krb5_rc_resolve(rcache, cp)) {
-       xfree(rcache);
+       krb5_xfree(rcache);
        com_err(PROGNAME, retval, "while resolving replay cache type");
        exit(1);
     }
@@ -308,7 +308,7 @@ char *argv[];
        com_err(PROGNAME, errno, "while sending SAFE message");
     printf("Sent checksummed message: %d bytes\n", i);
 
-    xfree(packet.data);
+    krb5_xfree(packet.data);
     /* PREPARE KRB_PRIV MESSAGE */
 
 
index 611cde84eee35e4eae8791156b8f263a2fade6b1..8e821255a000b3aeb84b93e6f3e4482d24a6600f 100644 (file)
@@ -204,12 +204,12 @@ char *argv[];
                              &message)) {
        com_err(PROGNAME, retval, "while verifying SAFE message");
        (void) krb5_rc_close(rcache);
-       xfree(rcache);
+       krb5_xfree(rcache);
        exit(1);
     }
     printf("Safe message is: '%.*s'\n", message.length, message.data);
 
-    xfree(message.data);
+    krb5_xfree(message.data);
     krb5_free_address(portforeign_addr);
 
     /* NOW GET ENCRYPTED MESSAGE */
@@ -221,7 +221,7 @@ char *argv[];
     if (i < 0) {
        perror("receiving datagram");
        (void) krb5_rc_close(rcache);
-       xfree(rcache);
+       krb5_xfree(rcache);
        exit(1);
     }
     printf("Received %d bytes\n", i);
@@ -231,7 +231,7 @@ char *argv[];
                                   &portforeign_addr)) {
        com_err(PROGNAME, retval, "while generating port address");
        (void) krb5_rc_close(rcache);
-       xfree(rcache);
+       krb5_xfree(rcache);
        exit(1);
     }
 
@@ -241,13 +241,13 @@ char *argv[];
                              &message)) {
        com_err(PROGNAME, retval, "while verifying PRIV message");
        (void) krb5_rc_close(rcache);
-       xfree(rcache);
+       krb5_xfree(rcache);
        exit(1);
     }
     printf("Decrypted message is: '%.*s'\n", message.length, message.data);
 
     (void) krb5_rc_close(rcache);
-    xfree(rcache);
+    krb5_xfree(rcache);
 
     exit(0);
 }
index dcc892774470c77698c729cd5ffd51e218fa4ddf..89af513a312cebeeece0e2d443d4f348de2d1866 100644 (file)
@@ -84,7 +84,7 @@ get_for_creds(etype, sumtype, rhost, client, enc_key, forwardable, outbuf)
     }
     if (!hrealms[0]) {
        free(remote_host);
-       xfree(hrealms);
+       krb5_xfree(hrealms);
        return KRB5_ERR_HOST_REALM_UNKNOWN;
     }
 
@@ -309,7 +309,7 @@ krb5_data *outbuf;
     if (!(scratch->data = realloc(scratch->data,
                                  ret_cred.enc_part.ciphertext.length))) {
        /* may destroy scratch->data */
-       xfree(scratch);
+       krb5_xfree(scratch);
        return ENOMEM;
     }
     memset(scratch->data + scratch->length, 0,
@@ -359,7 +359,7 @@ krb5_data *outbuf;
     cleanup_encpart();
 
     *outbuf = *scratch;
-    xfree(scratch);
+    krb5_xfree(scratch);
     return 0;
 
  clean_prockey:
@@ -451,14 +451,14 @@ const krb5_address *recv_addr;    /* optional */
        return retval;
     }
     
-#define cleanup_credmsg() {(void)xfree(credmsg->enc_part.ciphertext.data); (void)xfree(credmsg);}
+#define cleanup_credmsg() {(void)krb5_xfree(credmsg->enc_part.ciphertext.data); (void)krb5_xfree(credmsg);}
 
     if (!(scratch = (krb5_data *) malloc(sizeof(*scratch)))) {
        cleanup_credmsg();
        return ENOMEM;
     }
 
-#define cleanup_scratch() {(void)memset(scratch->data, 0, scratch->length); (void)xfree(scratch->data);}
+#define cleanup_scratch() {(void)memset(scratch->data, 0, scratch->length); (void)krb5_xfree(scratch->data);}
 
     if (retval = encode_krb5_ticket(credmsg->tickets[0], &scratch)) {
        cleanup_credmsg();
@@ -468,7 +468,7 @@ const krb5_address *recv_addr;    /* optional */
 
     creds->ticket = *scratch;
     if (!(creds->ticket.data = malloc(scratch->length))) {
-       xfree(creds->ticket.data);
+       krb5_xfree(creds->ticket.data);
        return ENOMEM;
     }
     memcpy((char *)creds->ticket.data, (char *) scratch->data, scratch->length);
@@ -526,7 +526,7 @@ const krb5_address *recv_addr;    /* optional */
     }
     cleanup_scratch();
 
-#define cleanup_mesg() {(void)xfree(credmsg_enc_part);}
+#define cleanup_mesg() {(void)krb5_xfree(credmsg_enc_part);}
 
     if (retval = krb5_timeofday(&currenttime)) {
        cleanup_mesg();
index 52981b7230b1d7516cb6396d2dd743c72172db3b..f7c069f4fc507a59426fdffc7aa3248add2c94bb 100644 (file)
@@ -38,7 +38,7 @@
 /* makedepend won't understand -YPOSIX also implies -DPOSIX... */
 /* #define MakeDependFlags -DPOSIX */
 
-/* #define DefaultCDebugFlags OptimizedCDebugFlags */
+#define DefaultCDebugFlags DebuggableCDebugFlags
 
 /* #undef HasNdbm */
 #define HasNdbm YES
index 303e461103b9846b94cd1e6a5eac50b7db759782..96d08ecb52ea539257ef7512ba008830732c2b13 100644 (file)
@@ -31,8 +31,8 @@
 #define KRB5_FREE__
 
 /* to keep lint happy */
-#define xfree(val) free((char *)(val))
+#define krb5_xfree(val) free((char *)(val))
 
-#define krb5_free_data(val) { xfree((val)->data); xfree(val);}
+#define krb5_free_data(val) { krb5_xfree((val)->data); krb5_xfree(val);}
 
 #endif /* KRB5_FREE__ */
index 4322854bf39749c3b545af1e4ca2e596e2ea8dba..d1541fcc77048124e223bb573b2c9371d66d082d 100644 (file)
@@ -242,6 +242,8 @@ void krb5_free_principal
        PROTOTYPE((krb5_principal ));
 void krb5_free_authenticator
        PROTOTYPE((krb5_authenticator * ));
+void krb5_free_authenticator_contents
+       PROTOTYPE((krb5_authenticator * ));
 void krb5_free_addresses
        PROTOTYPE((krb5_address ** ));
 void krb5_free_address
index 3a5817dca70c325d0c2e4dd6916ba705e7d66c28..f36233825c56def6436dc437d49f1c6e8fc1f635 100644 (file)
@@ -214,9 +214,9 @@ OLDDECLARG(krb5_db_entry *, entry)
        memset((char *) entry->key.contents, 0, entry->key.length);
        memset((char *) entry->alt_key.contents, 0, entry->alt_key.length);
        if (entry->key.contents)
-           xfree(entry->key.contents);
+           krb5_xfree(entry->key.contents);
        if (entry->alt_key.contents)
-           xfree(entry->alt_key.contents);
+           krb5_xfree(entry->alt_key.contents);
        return(KRB_ERR_GENERIC);
     }
 
@@ -263,9 +263,9 @@ OLDDECLARG(krb5_db_entry *, entry)
            memset((char *) entry->key.contents, 0, entry->key.length);
            memset((char *) entry->alt_key.contents, 0, entry->alt_key.length);
            if (entry->key.contents)
-               xfree(entry->key.contents);
+               krb5_xfree(entry->key.contents);
            if (entry->alt_key.contents)
-               xfree(entry->alt_key.contents);
+               krb5_xfree(entry->alt_key.contents);
            return(5);
        }
     }
@@ -274,11 +274,11 @@ OLDDECLARG(krb5_db_entry *, entry)
 
     memset((char *) entry->key.contents, 0, entry->key.length);
     if (entry->key.contents)
-       xfree(entry->key.contents);
+       krb5_xfree(entry->key.contents);
 
     memset((char *) entry->alt_key.contents, 0, entry->alt_key.length);
     if (entry->alt_key.contents)
-       xfree(entry->alt_key.contents);
+       krb5_xfree(entry->alt_key.contents);
 
     if (retval) {
        com_err("adm_modify_kdb", retval, 
@@ -370,7 +370,7 @@ OLDDECLARG(krb5_db_entry *, entry)
        }
 
        salt.saltdata = *foo;
-       xfree(foo);
+       krb5_xfree(foo);
        altsalt.salttype = KRB5_KDB_SALTTYPE_V4;
        altsalt.saltdata.data = 0;
        altsalt.saltdata.length = 0;
@@ -391,7 +391,7 @@ OLDDECLARG(krb5_db_entry *, entry)
        com_err("adm_enter_pwd_key", retval, 
                "while converting password to alt_key for '%s'", newprinc);
        memset((char *) new_password, 0, sizeof(new_password)); /* erase it */
-       xfree(salt.saltdata.data);
+       krb5_xfree(salt.saltdata.data);
        return(retval);
     }
 
@@ -402,7 +402,7 @@ OLDDECLARG(krb5_db_entry *, entry)
                                 &altsalt.saltdata)) {
        com_err("adm_enter_pwd_key", retval, 
                "while converting password to alt_key for '%s'", newprinc);
-       xfree(salt.saltdata.data);
+       krb5_xfree(salt.saltdata.data);
        free(entry->alt_key.contents);
        memset((char *) new_password, 0, sizeof(new_password)); /* erase it */
        return(retval);
@@ -546,7 +546,7 @@ OLDDECLARG(krb5_db_entry *, entry)
         com_err("adm_enter_rnd_pwd_key", 0, "Unable to Initialize Random Key");
         (void) krb5_finish_key(&master_encblock);
         memset((char *)master_keyblock.contents, 0, master_keyblock.length);
-        xfree(master_keyblock.contents);
+        krb5_xfree(master_keyblock.contents);
         goto finish;
     }
 
index e0caf7da9de265b30363bcff3feba03cfb0dee1e..505a62e8f2805b0baeeabd9dd938b51ba1948259 100644 (file)
@@ -76,7 +76,7 @@ int request_exit()
 int krb5_free_keyblock_contents(krb5_keyblock *key)
 {
      memset(key->contents, 0, key->length);
-     xfree(key->contents);
+     krb5_xfree(key->contents);
      return 0;
 }
 
index 11d37751a356cb485ac6621184fca4e2f4df4f9f..14758851eb9b8c158d146d6eaa338db330c02a8d 100644 (file)
@@ -41,7 +41,7 @@ krb5_error_code mit_des_finish_random_key (DECLARG(krb5_pointer *, seed))
 OLDDECLARG(krb5_pointer *, seed)
 {
     memset((char *)*seed, 0, sizeof(mit_des_random_key_seed) );
-    xfree(*seed);
+    krb5_xfree(*seed);
     *seed = 0;
     return 0;
 }
index 681a799d6b0147817740c52161a13b69354b8021..2d34df19d95abea9d031e522e64e1d1b8537252f 100644 (file)
@@ -111,10 +111,10 @@ void mit_des_init_random_number_generator(key,p_seed)
           libraries */
        register krb5_address **addr2;
        for (addr2 = addrs; *addr2; addr2++) {
-           xfree((*addr2)->contents);
-           xfree(*addr2);
+           krb5_xfree((*addr2)->contents);
+           krb5_xfree(*addr2);
        }
-       xfree(addrs);
+       krb5_xfree(addrs);
     }
     /*
      * Generate a tempory value that depends on the key and host_id
index 8c835dbb4219808e16af69bc88b150db99de76b3..2c2f2774518b5e67c5c85ca73472d4f180da4360 100644 (file)
@@ -48,7 +48,7 @@ OLDDECLARG(krb5_keyblock **, keyblock)
     if (!(randkey = (krb5_keyblock *)malloc(sizeof(*randkey))))
        return ENOMEM;
     if (!(randkey->contents = (krb5_octet *)malloc(sizeof(mit_des_cblock)))) {
-       xfree(randkey);
+       krb5_xfree(randkey);
        return ENOMEM;
     }
     randkey->length = sizeof(mit_des_cblock);
index e19b1f5ae8aead2358c139b53d20c6a473a987a2..ce3bdba232bf3941b815ff1c64196f81fdf8d392 100644 (file)
@@ -162,7 +162,7 @@ OLDDECLARG(const krb5_data *, salt)
 
     /* clean & free the input string */
     memset(copystr, 0, length);
-    xfree(copystr);
+    krb5_xfree(copystr);
 
     /* now fix up key parity again */
     mit_des_fixup_key_parity(key);
index 048e0f93223e545459430f833493831fcbde8edf..9698e7f5b39a5b82ac5a4b6b98b6a6e7e2f3c734 100644 (file)
@@ -88,7 +88,7 @@ OLDDECLARG(krb5_const_principal, princ)
        return(ENOMEM);
 
 #define cleanup() {memset(keyblock->contents, 0, sizeof(mit_des_cblock));\
-                      xfree(keyblock->contents);}
+                      krb5_xfree(keyblock->contents);}
 
     keyblock->keytype = KEYTYPE_DES;
     keyblock->length = sizeof(mit_des_cblock);
index 135d17e2dfadd5caa3b21ba60cd540dbd6817aea..d0cc43c19633cc2c94571e383ab2a2e61961fccb 100644 (file)
@@ -149,7 +149,7 @@ OM_uint32 gss_accept_sec_context(minor_status, context_handle,
                context->my_address.length = channel->initiator_address.length;
                if (!(context->my_address.contents = (krb5_octet *)
                      malloc(context->my_address.length))) {
-                       xfree(context);
+                       krb5_xfree(context);
                        return(GSS_S_FAILURE);
                }
                memcpy((char *) context->my_address.contents,
@@ -159,8 +159,8 @@ OM_uint32 gss_accept_sec_context(minor_status, context_handle,
                context->his_address.length = channel->acceptor_address.length;
                if (!(context->his_address.contents = (krb5_octet *)
                      malloc(context->my_address.length))) {
-                       xfree(context->my_address.contents);
-                       xfree(context);
+                       krb5_xfree(context->my_address.contents);
+                       krb5_xfree(context);
                        return(GSS_S_FAILURE);
                }
                memcpy((char *) context->his_address.contents,
@@ -179,9 +179,9 @@ OM_uint32 gss_accept_sec_context(minor_status, context_handle,
                        if (*minor_status =
                            krb5_generate_seq_number(authdat->ticket->enc_part2->session,
                                                     &context->my_seq_num)) {
-                               xfree(context->his_address.contents);
-                               xfree(context->my_address.contents);
-                               xfree(context);
+                               krb5_xfree(context->his_address.contents);
+                               krb5_xfree(context->my_address.contents);
+                               krb5_xfree(context);
                                krb5_free_tkt_authent(authdat);
                                return(GSS_S_FAILURE);
                        }
@@ -195,9 +195,9 @@ OM_uint32 gss_accept_sec_context(minor_status, context_handle,
                            krb5_mk_rep(&repl,
                                        authdat->ticket->enc_part2->session,
                                        &outbuf)) {
-                               xfree(context->his_address.contents);
-                               xfree(context->my_address.contents);
-                               xfree(context);
+                               krb5_xfree(context->his_address.contents);
+                               krb5_xfree(context->my_address.contents);
+                               krb5_xfree(context);
                                krb5_free_tkt_authent(authdat);
                                return(GSS_S_FAILURE);
                        }
@@ -207,10 +207,10 @@ OM_uint32 gss_accept_sec_context(minor_status, context_handle,
                                                           outbuf.length,
                                                           outbuf.data,
                                                           output_token)) {
-                               xfree(context->his_address.contents);
-                               xfree(context->my_address.contents);
-                               xfree(context);
-                               xfree(outbuf.data);
+                               krb5_xfree(context->his_address.contents);
+                               krb5_xfree(context->my_address.contents);
+                               krb5_xfree(context);
+                               krb5_xfree(outbuf.data);
                                krb5_free_tkt_authent(authdat);
                                return(GSS_S_FAILURE);
                        }
@@ -222,18 +222,18 @@ OM_uint32 gss_accept_sec_context(minor_status, context_handle,
                if (*minor_status =
                    krb5_copy_principal(verifier_cred_handle.principal,
                                        &context->me)) {
-                       xfree(context->his_address.contents);
-                       xfree(context->my_address.contents);
-                       xfree(context);
+                       krb5_xfree(context->his_address.contents);
+                       krb5_xfree(context->my_address.contents);
+                       krb5_xfree(context);
                        return(GSS_S_FAILURE);
                }
                if (*minor_status =
                    krb5_copy_principal(authdat->authenticator->client,
                                        &context->him)) {
                        krb5_free_principal(context->me);
-                       xfree(context->his_address.contents);
-                       xfree(context->my_address.contents);
-                       xfree(context);
+                       krb5_xfree(context->his_address.contents);
+                       krb5_xfree(context->my_address.contents);
+                       krb5_xfree(context);
                        return(GSS_S_FAILURE);
                }
                if (*minor_status =
@@ -241,9 +241,9 @@ OM_uint32 gss_accept_sec_context(minor_status, context_handle,
                                       &context->session_key)) {
                        krb5_free_principal(context->me);
                        krb5_free_principal(context->him);
-                       xfree(context->his_address.contents);
-                       xfree(context->my_address.contents);
-                       xfree(context);
+                       krb5_xfree(context->his_address.contents);
+                       krb5_xfree(context->my_address.contents);
+                       krb5_xfree(context);
                        return(GSS_S_FAILURE);
                }
                context->his_seq_num = authdat->authenticator->seq_number;
@@ -260,12 +260,12 @@ OM_uint32 gss_accept_sec_context(minor_status, context_handle,
                if (src_name) {
                        if (*minor_status = krb5_copy_principal(context->him,
                                                                src_name)) {
-                               xfree(context->session_key->contents);
+                               krb5_xfree(context->session_key->contents);
                                krb5_free_principal(context->me);
                                krb5_free_principal(context->him);
-                               xfree(context->his_address.contents);
-                               xfree(context->my_address.contents);
-                               xfree(context);
+                               krb5_xfree(context->his_address.contents);
+                               krb5_xfree(context->my_address.contents);
+                               krb5_xfree(context);
                                return(GSS_S_FAILURE);
                        }
                }
index 8078ae1d3baeecf04cdfc1d9d2b05b96a60b17b6..87f48d8325550dd064acb3f2a1843756409abe38 100644 (file)
@@ -149,7 +149,7 @@ OM_uint32 gss_init_sec_context(minor_status, claimant_cred_handle,
                context->my_address.length = channel->initiator_address.length;
                if (!(context->my_address.contents = (krb5_octet *)
                      malloc(context->my_address.length))) {
-                       xfree(context);
+                       krb5_xfree(context);
                        return(GSS_S_FAILURE);
                }
                memcpy((char *) context->my_address.contents,
@@ -159,8 +159,8 @@ OM_uint32 gss_init_sec_context(minor_status, claimant_cred_handle,
                context->his_address.length = channel->acceptor_address.length;
                if (!(context->his_address.contents = (krb5_octet *)
                      malloc(context->my_address.length))) {
-                       xfree(context->my_address.contents);
-                       xfree(context);
+                       krb5_xfree(context->my_address.contents);
+                       krb5_xfree(context);
                        return(GSS_S_FAILURE);
                }
                memcpy((char *) context->his_address.contents,
@@ -172,8 +172,8 @@ OM_uint32 gss_init_sec_context(minor_status, claimant_cred_handle,
                if (*minor_status =
                    krb5_generate_seq_number(&creds.keyblock,
                                             &context->my_seq_num)) {
-                       xfree(context->his_address.contents);
-                       xfree(context->my_address.contents);
+                       krb5_xfree(context->his_address.contents);
+                       krb5_xfree(context->my_address.contents);
                        free((char *)context);
                        return(GSS_S_FAILURE);
                }
@@ -222,7 +222,7 @@ OM_uint32 gss_init_sec_context(minor_status, claimant_cred_handle,
                if (*minor_status =
                    krb5_copy_keyblock(&creds.keyblock,
                                       &context->session_key)) {
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                        krb5_free_cred_contents(&creds);
                        free((char *)context);
                        return(GSS_S_FAILURE);
@@ -234,7 +234,7 @@ OM_uint32 gss_init_sec_context(minor_status, claimant_cred_handle,
                                                   outbuf.length,
                                                   outbuf.data,
                                                   output_token)) {
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                        krb5_free_cred_contents(&creds);
                        free((char *) context);
                        return(GSS_S_FAILURE);
@@ -243,7 +243,7 @@ OM_uint32 gss_init_sec_context(minor_status, claimant_cred_handle,
                 * Send over the requested flags information
                 */
                ((char *) output_token->value)[4] = context->flags;
-               xfree(outbuf.data);
+               krb5_xfree(outbuf.data);
                *context_handle = context;
                context->state = GSS_KRB_STATE_DOWN;
                *ret_flags = context->flags;
index 54a3761ee4d5ac168f817a2b1a2736459dd67782..af9a758e418d29a90fc81aa6175f81c711818e01 100644 (file)
@@ -36,7 +36,7 @@ OM_uint32 gss_release_cred(minor_status, cred_handle)
        krb5_free_principal(cred_handle->principal);
        if (*minor_status = krb5_cc_close(cred_handle->ccache))
                return(GSS_S_FAILURE);
-       xfree(cred_handle->srvtab.contents);
+       krb5_xfree(cred_handle->srvtab.contents);
        return(GSS_S_COMPLETE);
 }
        
index 24fd65c4f381e552c149417dcc10a4b683efe18e..4d90656715c1b017947fc540534e974bed21542d 100644 (file)
@@ -78,7 +78,7 @@ OM_uint32 gss_seal(minor_status, context, conf_req_flag, qop_req,
                                                   outbuf.length,
                                                   outbuf.data,
                                                   output_message_buffer)) {
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                        return(GSS_S_FAILURE);
                }
                if (conf_state)
@@ -107,7 +107,7 @@ OM_uint32 gss_seal(minor_status, context, conf_req_flag, qop_req,
                                                   outbuf.length,
                                                   outbuf.data,
                                                   output_message_buffer)) {
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                        return(GSS_S_FAILURE);
                }
                if (conf_state)
index 39bd1938869b8551ba945222ca39f18eaa686583..62c264276e3ab101191b4ab64a0e31bf3faf2017 100644 (file)
@@ -63,7 +63,7 @@ OM_uint32 gss_sign(minor_status, context, qop_req,
        if (*minor_status = decode_krb5_safe(&outbuf, &message))
                return(GSS_S_FAILURE);
        message->user_data.length = 1;
-       xfree(outbuf.data);
+       krb5_xfree(outbuf.data);
        if (*minor_status = encode_krb5_safe(&message, &scratch)) {
                krb5_free_safe(message);
                return(GSS_S_FAILURE);
index b93b2b0be48754b72cbf55cce34ee7a0b0882db0..25cc14f5b261dff7e31b0c0511ba28405fc56db5 100644 (file)
@@ -53,7 +53,7 @@ OM_uint32 gss_verify(minor_status, context, message_buffer,
        if (*minor_status = decode_krb5_safe(&inbuf, &message))
                return(GSS_S_FAILURE);
        if (message->user_data.data)
-               xfree(message->user_data.data);
+               krb5_xfree(message->user_data.data);
        message->user_data.length = message_buffer->length;
        message->user_data.data = message_buffer->value;
        if (*minor_status = encode_krb5_safe(&message,  &scratch)) {
index a16630f7936b217044e7790ae86f5dfb41de53fe..89a79ab2eb61ce6bebb342bfc9af149b5f321b2e 100644 (file)
@@ -73,13 +73,13 @@ krb5_keyblock *out;
     if (retval = krb5_decrypt((krb5_pointer) ((char *) in->contents + 4),
                              (krb5_pointer) out->contents,
                              in->length-sizeof(in->length), eblock, 0)) {
-       xfree(out->contents);
+       krb5_xfree(out->contents);
        out->contents = 0;
        out->length = 0;
        return retval;
     }
     if (out->length < 0) {
-       xfree(out->contents);
+       krb5_xfree(out->contents);
        out->contents = 0;
        out->length = 0;
        return KRB5_KDB_INVALIDKEYSIZE;
index 05feeb1c99f3da096b5a78e46f28f99acc5a9aa4..1c3606de23165f9c2cb6283dde846140d657746d 100644 (file)
@@ -70,7 +70,7 @@ register krb5_encrypted_keyblock *out;
     out->length += sizeof(out->length);
     out->contents = (krb5_octet *)malloc(out->length);
     if (!out->contents) {
-       xfree(tmpin.contents);
+       krb5_xfree(tmpin.contents);
        out->contents = 0;
        out->length = 0;
        return ENOMEM;
@@ -85,9 +85,9 @@ register krb5_encrypted_keyblock *out;
     retval = krb5_encrypt((krb5_pointer) tmpin.contents,
                          (krb5_pointer) ((char *) out->contents + 4),
                          tmpin.length, eblock, 0);
-    xfree(tmpin.contents);
+    krb5_xfree(tmpin.contents);
     if (retval) {
-       xfree(out->contents);
+       krb5_xfree(out->contents);
        out->contents = 0;
        out->length = 0;
     }
index 38f79f9e1ef49fd2a6da28970f7bb19be3326724..98dcac7a4164b3798b892a287db9a78662363bb0 100644 (file)
@@ -101,7 +101,7 @@ OLDDECLARG(krb5_keyblock *,key)
        retval = krb5_string_to_key(eblock, key->keytype, key, &pwd,
                                    salt ? salt : &scratch);
        if (!salt)
-               xfree(scratch.data);
+               krb5_xfree(scratch.data);
        memset(password, 0, sizeof(password)); /* erase it */
        return retval;
 
index 145ed1d75e47f0ca2d780130963e4117044a2d6f..43aa3e4d797137de883915123e1473da256d705b 100644 (file)
@@ -752,17 +752,17 @@ krb5_db_entry *entry;
     /* erase the key */
     if (entry->key.contents) {
        memset((char *)entry->key.contents, 0, entry->key.length);
-       xfree(entry->key.contents);
+       krb5_xfree(entry->key.contents);
     }
     if (entry->salt)
-       xfree(entry->salt);
+       krb5_xfree(entry->salt);
     
     if (entry->alt_key.contents) {
        memset((char *)entry->alt_key.contents, 0, entry->alt_key.length);
-       xfree(entry->alt_key.contents);
+       krb5_xfree(entry->alt_key.contents);
     }
     if (entry->alt_salt)
-       xfree(entry->alt_salt);
+       krb5_xfree(entry->alt_salt);
     
     if (entry->principal)
        krb5_free_principal(entry->principal);
index 503abdae2e4875c5439bf4176edcab008be24586..a5617fe7ab7f33892c64b96855733f0eb2e70595 100644 (file)
@@ -84,7 +84,7 @@ krb5_encrypt_block *eblock;
        retval = krb5_finish_key(eblock);
 
     memset((char *)tempkey.contents, 0, tempkey.length);
-    xfree(tempkey.contents);
+    krb5_xfree(tempkey.contents);
     krb5_db_free_principal(&master_entry, nprinc);
     
     return retval;
index eeb6742d9bb543d115ce493cf509508c50409159..c572220144eb224e5f21924a4556f88af344c7b6 100644 (file)
@@ -101,7 +101,7 @@ struct sockaddr_in *receiver;
                         0,             /* ignore ivec */
                         &out5);
        krb5_rc_close(rcache);
-       xfree(rcache);
+       krb5_xfree(rcache);
        krb5_free_address(saddr2);
 
        if (r) {
index 9d1c91b4022fbe9ec80b4baab487ff6572d594be..85291eabb1eaf3d9c3fb19800122ee7538800322 100644 (file)
@@ -81,12 +81,12 @@ u_long checksum;
                        EPRINT "Return to long (%d > %d)\n",
                                outbuf.length, MAX_KTXT_LEN);
 #endif
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                        return(KFAILURE);
                }
                authent->length = outbuf.length;
                memcpy((char *)authent->dat, (char *)outbuf.data, outbuf.length);
-               xfree(outbuf.data);
+               krb5_xfree(outbuf.data);
        }
        return(krb425error(r));
 }
index 8bde66a9bb324522d062c4897e8a70b266a0223b..6f753216cde61af4d4d3470b47bdce221ab07179 100644 (file)
@@ -98,7 +98,7 @@ struct sockaddr_in *receiver;
                         rcache,
                         &out5);
        krb5_rc_close(rcache);
-       xfree(rcache);
+       krb5_xfree(rcache);
        krb5_free_address(saddr2);
 
        if (r) {
index af4e689958b2fc19fb750165f2dbb901066f84d6..cef751bc77267d4daec21025f57bf9520caaf9e6 100644 (file)
@@ -106,7 +106,7 @@ MSG_DAT *msg;
        r = krb5_rd_priv(&inbuf, &keyb, saddr2, &raddr,
                         0, 0, 0, rcache, &out);
        krb5_rc_close(rcache);
-       xfree(rcache);
+       krb5_xfree(rcache);
 
        krb5_free_address(saddr2);
 
index 5ae55e1f707dcaebd515a8188412c717d8c61136..4f89e9b133577825b66c366c625ef2c34b3ff585 100644 (file)
@@ -105,7 +105,7 @@ MSG_DAT *msg;
        r = krb5_rd_safe(&inbuf, &keyb, saddr2, &raddr,
                         0, 0, rcache, &out);
        krb5_rc_close(rcache);
-       xfree(rcache);
+       krb5_xfree(rcache);
 
        krb5_free_address(saddr2);
 
index a40ec35c005d1ee4aed6ccee5a462ddcd428f8c9..34871a2e3c8138eeffc72500e5bcd3e1c549dcfd 100644 (file)
@@ -39,7 +39,7 @@ int cvt;
 {
        if (cvt) {
                if (_krb425_servkey.contents)
-                       xfree(_krb425_servkey.contents);
+                       krb5_xfree(_krb425_servkey.contents);
                mit_des_string_to_key(KEYTYPE_DES, &_krb425_servkey, 0, 0);
        } else {
                if (!_krb425_servkey.contents &&
index e9172126bfdd159aeddf75b644b0bbd165642603..c2669fd2defb8120dddb0394447559a1cbb5a8e0 100644 (file)
@@ -63,7 +63,7 @@ register int *error;
     }
     for (i = 0; i < val->nelem; i++) {
        if (qb_pullup(val->element_KRB5_2[i]->ad__data) != OK) {
-           xfree(retval);
+           krb5_xfree(retval);
            goto nomem;
        }
        retval[i] = (krb5_authdata *) xmalloc(sizeof(*retval[i]));
@@ -73,7 +73,7 @@ register int *error;
        }
        retval[i]->contents = (unsigned char *)xmalloc(val->element_KRB5_2[i]->ad__data->qb_forw->qb_len);
        if (!retval[i]->contents) {
-           xfree(retval[i]);
+           krb5_xfree(retval[i]);
            retval[i] = 0;
            krb5_free_authdata(retval);
            goto nomem;
@@ -103,7 +103,7 @@ register int *error;
     }
     for (i = 0, rv = val; rv; rv = rv->next, i++) {
        if (qb_pullup(rv->element_KRB5_2->ad__data) != OK) {
-           xfree(retval);
+           krb5_xfree(retval);
            goto nomem;
        }
        retval[i] = (krb5_authdata *) xmalloc(sizeof(*retval[i]));
@@ -113,7 +113,7 @@ register int *error;
        }
        retval[i]->contents = (unsigned char *)xmalloc(rv->element_KRB5_2->ad__data->qb_forw->qb_len);
        if (!retval[i]->contents) {
-           xfree(retval[i]);
+           krb5_xfree(retval[i]);
            retval[i] = 0;
            krb5_free_authdata(retval);
            goto nomem;
index f0677d5713234bdc41c52d18051270c63cfe38e2..db93c80819bc9bca81b9b2ef2fb67fe769860f0f 100644 (file)
@@ -64,7 +64,7 @@ register int *error;
     }
     for (i = 0; i < val->nelem; i++) {
        if (qb_pullup(val->element_KRB5_0[i]->address) != OK) {
-           xfree(retval);
+           krb5_xfree(retval);
            goto nomem;
        }
        retval[i] = (krb5_address *) xmalloc(sizeof(*retval[i]));
@@ -74,7 +74,7 @@ register int *error;
        }
        retval[i]->contents = (unsigned char *)xmalloc(val->element_KRB5_0[i]->address->qb_forw->qb_len);
        if (!retval[i]->contents) {
-           xfree(retval[i]);
+           krb5_xfree(retval[i]);
            retval[i] = 0;
            krb5_free_addresses(retval);
            goto nomem;
@@ -104,7 +104,7 @@ register int *error;
     }
     for (i = 0, rv = val; rv; rv = rv->next, i++) {
        if (qb_pullup(rv->element_KRB5_0->address) != OK) {
-           xfree(retval);
+           krb5_xfree(retval);
            goto nomem;
        }
        retval[i] = (krb5_address *) xmalloc(sizeof(*retval[i]));
@@ -114,7 +114,7 @@ register int *error;
        }
        retval[i]->contents = (unsigned char *)xmalloc(rv->element_KRB5_0->address->qb_forw->qb_len);
        if (!retval[i]->contents) {
-           xfree(retval[i]);
+           krb5_xfree(retval[i]);
            retval[i] = 0;
            krb5_free_addresses(retval);
            goto nomem;
index cbacea7313a808be05b728bee89f55c87d3b05cc..16be8111065601f99d790380b3ae3c538efd6e0e 100644 (file)
@@ -59,12 +59,12 @@ register int *error;
     xbzero(retval, sizeof(*retval));
 
     if (qb_pullup(val->address) != OK) {
-       xfree(retval);
+       krb5_xfree(retval);
        goto nomem;
     }
     retval->contents = (unsigned char *)xmalloc(val->address->qb_forw->qb_len);
     if (!retval->contents) {
-       xfree(retval);
+       krb5_xfree(retval);
        goto nomem;
     }
     retval->addrtype = val->addr__type;
index b42615f3796effc0933494d0e871fce760684deb..49bc5b297f82a0b52f5b300591d3d986a3c8a929 100644 (file)
@@ -59,9 +59,9 @@ register int *error;
     temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
     if (temp) {
        retval->enc_part = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     return(retval);
index a671372e01cc90968238876db6f4e26a186d5b3e..7c587723c0558c263752e93264dbbcb4a3541dd7 100644 (file)
@@ -66,7 +66,7 @@ register int *error;
     temp = KRB5_EncryptedData2krb5_enc_data(val->authenticator, error);
     if (temp) {
        retval->authenticator = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
        krb5_free_ap_req(retval);
        return(0);
index aacad21a902d453d7e5ea8d6a287e102eedb2c3c..25a4cfd87ac5cca613d79e560db119a281d8fb2c 100644 (file)
@@ -57,7 +57,7 @@ register int *error;
 
     retval->ctime = gentime2unix(val->ctime, error);
     if (*error) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }  
     retval->cusec = val->cusec;
index 5b44441a6034949c1371fc117855f2e06e7d35ea..91fa9a2a8b9a6aed6d1e8a0f5e00ab98c8de9b9f 100644 (file)
@@ -60,7 +60,7 @@ register int *error;
                                                       val->crealm,
                                                       error);
     if (!retval->client) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     if (val->cksum) {
index 0a21b784df6976258f32e3eaad5f1d4f14199330..f68927e28f7acaf20011fcedda36c47f6de4ad15 100644 (file)
@@ -65,7 +65,7 @@ register int *error;
     }
     retval->contents = (unsigned char *)xmalloc(val->checksum->qb_forw->qb_len);
     if (!retval->contents) {
-       xfree(retval);
+       krb5_xfree(retval);
        goto nomem;
     }
     retval->checksum_type = val->cksumtype;
index 2e992c388e401314021030e65adc5716a0460feb..2cd082a6d4b37a2d4f790a30ee6b384c038468b7 100644 (file)
@@ -65,7 +65,7 @@ register int *error;
     retval->tickets = (krb5_ticket **) xcalloc(i + 1, sizeof(*retval->tickets));
     if (!retval->tickets) {
        *error = ENOMEM;
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     
@@ -75,7 +75,7 @@ register int *error;
        if (!retval->tickets[i]) {
            krb5_free_tickets(retval->tickets);
            *error = ENOMEM;
-           xfree(retval);
+           krb5_xfree(retval);
            return(0);
        }
        xbzero((char *)retval->tickets[i], sizeof(*retval->tickets[i]));
@@ -83,7 +83,7 @@ register int *error;
        retval->tickets[i] = KRB5_Ticket2krb5_ticket(rv->Ticket, error);
        if (!retval->tickets[i]) {
            krb5_free_tickets(retval->tickets);
-           xfree(retval);
+           krb5_xfree(retval);
            return(0);
        }
     }
@@ -93,10 +93,10 @@ register int *error;
     temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
     if (temp) {
        retval->enc_part = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
        krb5_free_tickets(retval->tickets);
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
 
index 2d3bfa9baec0a43495532fdf6fce2f59de8d3367..da0a4b955bb124b6f1beb3a0f080da52e022df00 100644 (file)
@@ -59,9 +59,9 @@ register int *error;
     temp = qbuf2krb5_data(val->cipher, error);
     if (temp) {
        retval->ciphertext = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     if (val->optionals & opt_KRB5_EncryptedData_kvno)
index 5d34c765ff815accd75826e71a6f22aec8fc6408..7a53badf70aa4e0721fcf11dce694ed524190243 100644 (file)
@@ -57,7 +57,7 @@ register int *error;
 
     retval->session = KRB5_EncryptionKey2krb5_keyblock(val->key, error);
     if (!retval->session) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
 
index 260bea2ca4ea846920d5ff6aa67ad4b2fa11b939..4db62735b998f01843719849564edc0948ca32eb 100644 (file)
@@ -66,7 +66,7 @@ register int *error;
     }
     retval->contents = (unsigned char *) xmalloc(val->keyvalue->qb_forw->qb_len);
     if (!retval->contents) {
-       xfree(retval);
+       krb5_xfree(retval);
        goto nomem;
     }
     retval->keytype = val->keytype;
index afa5be978974f718e5090ff6ad506b6b95ae0a01..f6ebdab14a249de2f12b130f5b299535af9924a4 100644 (file)
@@ -86,7 +86,7 @@ void (*free_translation) PROTOTYPE((krb5_pointer ));
     alldatout:
        free((*data_out)->data);
     datout:
-       xfree(*data_out);
+       krb5_xfree(*data_out);
        *data_out = 0;
     peout:
        pe_free(pe);
index 69d38a73c65e5c77387c2356f66ff119f4ce7c06..4dd918cd8ccee5f11fa5701a231190ee756e20a1 100644 (file)
@@ -96,7 +96,7 @@ register int *error;
        temp = qbuf2krb5_data(val->e__text, error);
        if (temp) {
            retval->text = *temp;
-           xfree(temp);
+           krb5_xfree(temp);
        } else {
            goto errout;
        }
@@ -105,7 +105,7 @@ register int *error;
        temp = qbuf2krb5_data(val->e__text, error);
        if (temp) {
            retval->text = *temp;
-           xfree(temp);
+           krb5_xfree(temp);
        } else {
            goto errout;
        }
index 8d4ccaba84209bbbde8e5b7ecf31872743b2017f..a78aef4e7213c8d74050c149dd2c0225f304b191 100644 (file)
@@ -64,7 +64,7 @@ register int *error;
 
     retval->flags = KRB5_TicketFlags2krb5_flags(val->flags, error);
     if (*error) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
 
@@ -84,7 +84,7 @@ register int *error;
     temp = KRB5_TransitedEncoding2krb5_transited(val->transited, error);
     if (temp) {
        retval->transited = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
        goto errout;
     }
index 03d9899c2a1f541919d32f7a46f06d2f441b48d2..ad712da5a10d059eb1cafc0017ee458fa749412c 100644 (file)
@@ -81,7 +81,7 @@ register int *error;
                                                       (val[i])->length, 1);
        if (!retval->element_KRB5_2[i]->ad__data) {
            /* clean up */
-           xfree(retval->element_KRB5_2[i]);
+           krb5_xfree(retval->element_KRB5_2[i]);
            goto errout;
        }
     }
index 6efebe2be293b1148c7e1b23e2c22bb0b9fd9a3d..cdf4742b21af0c4ece4092248842606eb9b26f8e 100644 (file)
@@ -85,7 +85,7 @@ register int *error;
                                                    (val[i])->length, 1);
        if (!retval->element_KRB5_0[i]->address) {
            /* clean up */
-           xfree(retval->element_KRB5_0[i]);
+           krb5_xfree(retval->element_KRB5_0[i]);
            goto errout;
        }
     }
@@ -129,7 +129,7 @@ register int *error;
                                              (val[i])->length, 1);
        if (!rv2->element_KRB5_0->address) {
            /* clean up */
-           xfree(rv2->element_KRB5_0);
+           krb5_xfree(rv2->element_KRB5_0);
            goto errout;
        }
     }
index 1ce8bf943aa0158b7a069cb0fd9b2da1bfb86661..2079ea21f378b815505ab7513e6bbdf8ae44cfc3 100644 (file)
@@ -58,7 +58,7 @@ register int *error;
     retval->addr__type = val->addrtype;
     retval->address = str2qb((char *)val->contents, val->length, 1);
     if (!retval->address) {
-       xfree(retval);
+       krb5_xfree(retval);
        goto nomem;
     }
     return(retval);
index 0c7ef8b7bad173a5891ac59e16b6354ff3873a77..b71cd93b55a993720882de2186ee36bb29dc0873 100644 (file)
@@ -60,7 +60,7 @@ register int *error;
     retval->enc__part = krb5_enc_data2KRB5_EncryptedData(&(val->enc_part),
                                                         error);
     if (!retval->enc__part) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     return(retval);
index 9a00b537db977b0715e921771fcd5dc3d5ba8b41..86e0c6e27151bed45d31b93b26de6da8aeb96940 100644 (file)
@@ -61,7 +61,7 @@ register int *error;
     retval->ap__options = krb5_apoptions2KRB5_APOptions(val->ap_options,
                                                        error);
     if (!retval->ap__options) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     retval->ticket = krb5_ticket2KRB5_Ticket(val->ticket, error);
index f21814aa1f129a9e0cd490aa132262e1d42c6842..146346fed89c2aee233bae97e7618623af3de5d4 100644 (file)
@@ -57,7 +57,7 @@ register int *error;
 
     retval->ctime = unix2gentime(val->ctime, error);
     if (!retval->ctime) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
 
index 1642997213c43670257fd054b379de79c17b285c..2e6cf76397989469800338bca752b893029d4112 100644 (file)
@@ -90,20 +90,20 @@ register int *error;
        
        rv2->Ticket = krb5_ticket2KRB5_Ticket(val->tickets[i], error);
        if (!rv2->Ticket) {
-           xfree(retval->tickets);
+           krb5_xfree(retval->tickets);
            return(0);
        }
     }
 
     if (!retval->tickets) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
 
     retval->enc__part = krb5_enc_data2KRB5_EncryptedData(&(val->enc_part),
                                                         error);
     if (!retval->enc__part) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     return(retval);
index fd47944e174040a82f23b6a95c197cfe7c89ce85..a60ccfe31f7cd9fddbd159bf0cac1827f45dc62a 100644 (file)
@@ -62,7 +62,7 @@ element_KRB5_112krb5_pa_data(val, error)
     }
     for (i = 0, rv = val; rv; rv = rv->next, i++) {
        if (qb_pullup(rv->PA__DATA->pa__data) != OK) {
-           xfree(retval);
+           krb5_xfree(retval);
            *error = ENOMEM;
            return(0);
        }
@@ -77,7 +77,7 @@ element_KRB5_112krb5_pa_data(val, error)
        if (retval[i]->length) {
            retval[i]->contents = (unsigned char *)xmalloc(rv->PA__DATA->pa__data->qb_forw->qb_len);
            if (!retval[i]->contents) {
-               xfree(retval[i]);
+               krb5_xfree(retval[i]);
                retval[i] = 0;
                krb5_free_pa_data(retval);
                *error = ENOMEM;
@@ -113,7 +113,7 @@ register int *error;
     if (val->padata) {
        retval->padata = element_KRB5_112krb5_pa_data(val->padata, error);
        if (*error) {
-           xfree(retval);
+           krb5_xfree(retval);
            return 0;
 
        }
@@ -122,7 +122,7 @@ register int *error;
                                                       val->crealm,
                                                       error);
     if (!retval->client) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
 
@@ -134,7 +134,7 @@ register int *error;
     temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
     if (temp) {
        retval->enc_part = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
        krb5_free_kdc_rep(retval);
        return(0);
index e86b2d85ecb386a28b40ccd7129298171099c995..f66918feb58565da3685775f11d8a3743e6655c4 100644 (file)
@@ -58,7 +58,7 @@ register int *error;
     retval->etype = val->etype;
     retval->cipher = krb5_data2qbuf(&(val->ciphertext));
     if (!retval->cipher) {
-       xfree(retval);
+       krb5_xfree(retval);
        *error = ENOMEM;
        return(0);
     }
index b70e76db4135b0af151fe19ae92916c66d457034..ee53e3479884aa828645379588431725d7196531 100644 (file)
@@ -57,7 +57,7 @@ register int *error;
 
     retval->key = krb5_keyblock2KRB5_EncryptionKey(val->session, error);
     if (!retval->key) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     retval->last__req = krb5_last_req2KRB5_LastReq(val->last_req, error);
index 31828c6b912f269399cb1191400aae7c105c2be4..102f7e297fffb027a72f88401f49acce45194323 100644 (file)
@@ -61,7 +61,7 @@ register int *error;
     if (val->ctime) {
        retval->ctime = unix2gentime(val->ctime, error);
        if (!retval->ctime) {
-           xfree(retval);
+           krb5_xfree(retval);
            return(0);
        }
     }
index d235087d2e818b08c3bd231466a6c8a91349d779..94dc4530d4f23dc9fcfef1768c95115223dfa880 100644 (file)
@@ -53,7 +53,7 @@ register int *error;
 
     retval->flags = krb5_flags2KRB5_TicketFlags(val->flags, error);
     if (*error) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     retval->key = krb5_keyblock2KRB5_EncryptionKey(val->session, error);
index 5eded53eda9f502785814ac0fabc148b58725fd8..9c4ebc3454c83458919e964112c79fc879bb8991 100644 (file)
@@ -57,7 +57,7 @@ register int *error;
 
     retval->user__data = krb5_data2qbuf(&(val->user_data));
     if (!retval->user__data) {
-       xfree(retval);
+       krb5_xfree(retval);
        *error = ENOMEM;
        return(0);
     }
index aeab624928b29cd859ed074d85306787125fa031..656849ecb792bd1148741f87bbf8ec265016cf72 100644 (file)
@@ -61,7 +61,7 @@ register int *error;
     retval->enc__part = krb5_enc_data2KRB5_EncryptedData(&(val->enc_part),
                                                         error);
     if (!retval->enc__part) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     return(retval);
index 473c8eca56339f222db8c759f24808ac5d5a4da6..4f2f9b245c712e8ee446fdb7ab5f10a4c62d9bfa 100644 (file)
@@ -117,7 +117,7 @@ register int *error;
                        free_KRB5_PasswdSequence(rv1->PasswdSequence);
 
                    rv2 = rv1->next;
-                   xfree(rv1);
+                   krb5_xfree(rv1);
                }
            goto errout;
            }
index 72b85b05b75ebdd68ed5d372391a736c35e08658..59763f45f7c2371593942587339fd2e5aa4d112b 100644 (file)
@@ -58,7 +58,7 @@ register int *error;
 
     rv2 = (struct type_KRB5_KRB__SAFE__BODY *)xmalloc(sizeof(*rv2));
     if (!rv2) {
-       xfree(retval);
+       krb5_xfree(retval);
        *error = ENOMEM;
        return(0);
     }
@@ -70,7 +70,7 @@ register int *error;
 
     rv2->user__data = krb5_data2qbuf(&(val->user_data));
     if (!rv2->user__data) {
-       xfree(retval);
+       krb5_xfree(retval);
        *error = ENOMEM;
        return(0);
     }
index b87bfbcf39f2f43e35f4e39e3e80159fc3467734..e560aa7b18aeda73f9cdc026a1abae08b57ea944 100644 (file)
@@ -171,7 +171,7 @@ register int *error;
                    free_KRB5_Ticket(adtk->Ticket[i]);
                    i--;
                }
-               xfree(adtk);
+               krb5_xfree(adtk);
                goto errout;
            }
        }
@@ -202,7 +202,7 @@ register int *error;
                    if (rv1->Ticket)
                        free_KRB5_Ticket(rv1->Ticket);
                    rv2 = rv1->next;
-                   xfree(rv1);
+                   krb5_xfree(rv1);
                }
                goto errout;
            }
@@ -299,7 +299,7 @@ register int *error;
     if (val->padata) {
        retval->padata = krb5_pa_data2element_KRB5_7(val->padata, error);
        if (*error) {
-           xfree(retval);
+           krb5_xfree(retval);
            return 0;
        }
     }
index a2b5c80e4c0b6280dbec9af177f820f66bcf1b2f..85195c3b9654d05b0d2533938b34963f361b5d27 100644 (file)
@@ -59,9 +59,9 @@ register int *error;
     temp = qbuf2krb5_data(val->user__data, error);
     if (temp) {
        retval->user_data = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     if (val->timestamp) {
index 9c844f2d19d360815d6e1eda265ec657211a84e3..f642115922afa1d977901ee37423bc92a4bcfb3f 100644 (file)
@@ -80,7 +80,7 @@ register int *error;
     retval->length = i;
     retval->data = (krb5_data *)malloc(i * sizeof(krb5_data));
     if (retval->data == 0) {
-       xfree(retval);
+       krb5_xfree(retval);
        *error = ENOMEM;
        return 0;
     }
@@ -88,8 +88,8 @@ register int *error;
     retval->type = val->name__type;
 
     if (qbuf_to_data(realm, krb5_princ_realm(retval))) {
-       xfree(retval->data);
-       xfree(retval);
+       krb5_xfree(retval->data);
+       krb5_xfree(retval);
        *error = ENOMEM;
        return 0;
     }
index 57d6700de476a9e833143fb4a8973e43892f82e7..dbf447a727694f10fa63416364cb14ecee1a9e38 100644 (file)
@@ -59,9 +59,9 @@ register int *error;
     temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
     if (temp) {
        retval->enc_part = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     return(retval);
index a8ab2d8c672493c4838b463a02ba57d1249c935b..5349c800640e726a6f3c419232dc4ba6e5f54207 100644 (file)
@@ -56,13 +56,13 @@ register int *error;
 
     retval->passwd = qbuf2krb5_data(val->passwd, error);
     if (!retval->passwd) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
 
     retval->phrase = qbuf2krb5_data(val->phrase, error);
     if (!retval->phrase) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
 
index 9d408a10d4965c523aa512e0449d0d93bcbde2bc..bffa2d5783e175b0ba651681e4bf3fa5b6ba9f3d 100644 (file)
@@ -84,7 +84,7 @@ register int *error;
                krb5_free_pwd_sequences(element[i]);
                i--;
            }
-           xfree(element);
+           krb5_xfree(element);
            goto errout;
        }
     }
index 7c5c74b506b52919dc68164b9997baa73a2cdbe6..1e36ce53a7265e6a7b2554aeabf48dd3cbe54bc9 100644 (file)
@@ -65,7 +65,7 @@ register int *error;
     }
     retval->data = (char *)xmalloc(val->qb_forw->qb_len);
     if (!retval->data) {
-       xfree(retval);
+       krb5_xfree(retval);
        goto nomem;
     }
     xbcopy(val->qb_forw->qb_data, retval->data,
index a3c4a18a45b126617e898d43ad43e9e5361ed989..bd3121f6beadcc1d087e39768884e3b9c2ab19c3 100644 (file)
@@ -59,9 +59,9 @@ register int *error;
     temp = qbuf2krb5_data(val->safe__body->user__data, error);
     if (temp) {
        retval->user_data = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     if (val->safe__body->timestamp) {
index 3021f1da14a0d826a1555cd3860614f6aa181e3d..67755746405967998ca6ce67aa079af8e1ccbf75 100644 (file)
@@ -137,7 +137,7 @@ register int *error;
                                                error);
        if (temp) {
            retval->authorization_data = *temp;
-           xfree(temp);
+           krb5_xfree(temp);
        } else
            goto errout;
     }
@@ -164,7 +164,7 @@ register int *error;
                    krb5_free_ticket(aticks[i]);
                    i--;
                }
-               xfree(aticks);
+               krb5_xfree(aticks);
                goto errout;
            }
        }
@@ -192,7 +192,7 @@ register int *error;
                    krb5_free_ticket(aticks[i]);
                    i--;
                }
-               xfree(aticks);
+               krb5_xfree(aticks);
                goto errout;
            }
        }
@@ -222,7 +222,7 @@ element_KRB5_72krb5_pa_data(val, error)
     }
     for (i = 0, rv = val; rv; rv = rv->next, i++) {
        if (qb_pullup(rv->PA__DATA->pa__data) != OK) {
-           xfree(retval);
+           krb5_xfree(retval);
            *error = ENOMEM;
            return(0);
        }
@@ -237,7 +237,7 @@ element_KRB5_72krb5_pa_data(val, error)
        if (retval[i]->length) {
            retval[i]->contents = (unsigned char *)xmalloc(rv->PA__DATA->pa__data->qb_forw->qb_len);
            if (!retval[i]->contents) {
-               xfree(retval[i]);
+               krb5_xfree(retval[i]);
                retval[i] = 0;
                krb5_free_pa_data(retval);
                *error = ENOMEM;
index 14d1fe7febbfceeab0e059102c84a6381d25d9c7..e05873d3468edde6b27a9f834206de64d82a6589 100644 (file)
@@ -61,14 +61,14 @@ register int *error;
                                                       val->realm,
                                                       error);
     if (!retval->server) {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
 
     temp = KRB5_EncryptedData2krb5_enc_data(val->enc__part, error);
     if (temp) {
        retval->enc_part = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
        krb5_free_ticket(retval);
        return(0);
index 3429f624880bdc307dc3e92be9e8aa5cc31532d4..6a9ff49961517ae800df94ef61775111423cd5e4 100644 (file)
@@ -60,9 +60,9 @@ register int *error;
     temp = qbuf2krb5_data(val->contents, error);
     if (temp) {
        retval->tr_contents = *temp;
-       xfree(temp);
+       krb5_xfree(temp);
     } else {
-       xfree(retval);
+       krb5_xfree(retval);
        return(0);
     }
     return(retval);
index 303391a45425b37a80553b0ae38bd617269ea1c2..be154d37885af685f5989ceb51b5b67183b8ef0f 100644 (file)
@@ -50,9 +50,9 @@ krb5_fcc_close(id)
      if (((krb5_fcc_data *) id->data)->fd >= 0)
             krb5_fcc_close_file(id);
 
-     xfree(((krb5_fcc_data *) id->data)->filename);
-     xfree(((krb5_fcc_data *) id->data));
-     xfree(id);
+     krb5_xfree(((krb5_fcc_data *) id->data)->filename);
+     krb5_xfree(((krb5_fcc_data *) id->data));
+     krb5_xfree(id);
 
      return closeval;
 }
index ac21656925d78aaa0de5e99b50269c9c99811c69..dfd73a345cca160a94ce74fa750238cd46226f0f 100644 (file)
@@ -56,7 +56,7 @@ krb5_fcc_end_seq_get(id, cursor)
        and if not, fcc_start_seq_get and/or fcc_next_cred will do the
        MAYBE_CLOSE.
      MAYBE_CLOSE(id, kret); */
-     xfree((krb5_fcc_cursor *) *cursor);
+     krb5_xfree((krb5_fcc_cursor *) *cursor);
 
      return kret;
 }
index 53c1f3de051ee7bac453ffa6869c8916611d81bb..2771e8bc2da222b278465ac99fcb39b31bf209ba 100644 (file)
@@ -79,7 +79,7 @@ krb5_fcc_generate_new (id)
 
      lid->data = (krb5_pointer) malloc(sizeof(krb5_fcc_data));
      if (lid->data == NULL) {
-         xfree(lid);
+         krb5_xfree(lid);
          return KRB5_CC_NOMEM;
      }
 
@@ -91,8 +91,8 @@ krb5_fcc_generate_new (id)
      ((krb5_fcc_data *) lid->data)->filename = (char *)
          malloc(strlen(scratch) + 1);
      if (((krb5_fcc_data *) lid->data)->filename == NULL) {
-         xfree(((krb5_fcc_data *) lid->data));
-         xfree(lid);
+         krb5_xfree(((krb5_fcc_data *) lid->data));
+         krb5_xfree(lid);
          return KRB5_CC_NOMEM;
      }
 
@@ -137,8 +137,8 @@ krb5_fcc_generate_new (id)
      }
 
 err_out:
-     xfree(((krb5_fcc_data *) lid->data)->filename);
-     xfree(((krb5_fcc_data *) lid->data));
-     xfree(lid);
+     krb5_xfree(((krb5_fcc_data *) lid->data)->filename);
+     krb5_xfree(((krb5_fcc_data *) lid->data));
+     krb5_xfree(lid);
      return retcode;
 }
index 5cea96887010d99710778c2ee47522b408a35b62..bcfba6552b129c1878c3918534fd327b1f5f59e1 100644 (file)
@@ -208,18 +208,18 @@ krb5_fcc_read_keyblock(id, keyblock)
                (keyblock->length)*sizeof(krb5_octet));
 
      if (ret < 0) {
-        xfree(keyblock->contents);
+        krb5_xfree(keyblock->contents);
         return krb5_fcc_interpret(errno);
      }
      if (ret != (keyblock->length)*sizeof(krb5_octet)) {
-        xfree(keyblock->contents);
+        krb5_xfree(keyblock->contents);
         return KRB5_CC_END;
      }
 
      return KRB5_OK;
  errout:
      if (keyblock->contents)
-        xfree(keyblock->contents);
+        krb5_xfree(keyblock->contents);
      return kret;
 }
 
@@ -248,18 +248,18 @@ krb5_fcc_read_data(id, data)
      ret = read(((krb5_fcc_data *) id->data)->fd, (char *)data->data,
                data->length);
      if (ret == -1) {
-        xfree(data->data);
+        krb5_xfree(data->data);
         return krb5_fcc_interpret(errno);
      }
      if (ret != data->length) {
-        xfree(data->data);
+        krb5_xfree(data->data);
         return KRB5_CC_END;
      }
      data->data[data->length] = 0; /* Null terminate, just in case.... */
      return KRB5_OK;
  errout:
      if (data->data)
-        xfree(data->data);
+        krb5_xfree(data->data);
      return kret;
 }
 
@@ -289,17 +289,17 @@ krb5_fcc_read_addr(id, addr)
      ret = read(((krb5_fcc_data *) id->data)->fd, (char *)addr->contents,
                (addr->length)*sizeof(krb5_octet));
      if (ret == -1) {
-         xfree(addr->contents);
+         krb5_xfree(addr->contents);
          return krb5_fcc_interpret(errno);
      }
      if (ret != (addr->length)*sizeof(krb5_octet)) {
-         xfree(addr->contents);
+         krb5_xfree(addr->contents);
          return KRB5_CC_END;
      }
      return KRB5_OK;
  errout:
      if (addr->contents)
-        xfree(addr->contents);
+        krb5_xfree(addr->contents);
      return kret;
 }
 
@@ -425,17 +425,17 @@ krb5_fcc_read_authdatum(id, a)
     ret = read(((krb5_fcc_data *) id->data)->fd, (char *)a->contents,
                (a->length)*sizeof(krb5_octet));
      if (ret == -1) {
-         xfree(a->contents);
+         krb5_xfree(a->contents);
          return krb5_fcc_interpret(errno);
      }
      if (ret != (a->length)*sizeof(krb5_octet)) {
-         xfree(a->contents);
+         krb5_xfree(a->contents);
          return KRB5_CC_END;
      }
      return KRB5_OK;
  errout:
      if (a->contents)
-        xfree(a->contents);
+        krb5_xfree(a->contents);
      return kret;
     
 }
index f674111c6dab35a877741eb777f305bbfb5a5e6b..c42f724b13b6425b6a916c4128e760a5cadb8dcd 100644 (file)
@@ -69,7 +69,7 @@ krb5_fcc_resolve (id, residual)
      
      lid->data = (krb5_pointer) malloc(sizeof(krb5_fcc_data));
      if (lid->data == NULL) {
-         xfree(lid);
+         krb5_xfree(lid);
          return KRB5_CC_NOMEM;
      }
 
@@ -77,8 +77,8 @@ krb5_fcc_resolve (id, residual)
          malloc(strlen(residual) + 1);
 
      if (((krb5_fcc_data *) lid->data)->filename == NULL) {
-         xfree(((krb5_fcc_data *) lid->data));
-         xfree(lid);
+         krb5_xfree(((krb5_fcc_data *) lid->data));
+         krb5_xfree(lid);
          return KRB5_CC_NOMEM;
      }
 
index 8c57c81557784813453ec6ae9e429b8eeb0c72b5..d2625ebaa1117dfd888d26198919cf39d5015943 100644 (file)
@@ -59,7 +59,7 @@ krb5_fcc_start_seq_get(id, cursor)
      if (OPENCLOSE(id)) {
          ret = krb5_fcc_open_file(id, FCC_OPEN_RDONLY);
          if (ret) {
-             xfree(fcursor);
+             krb5_xfree(fcursor);
              return ret;
          }
      }
index fd9027a222e72aad79908df3b5225287253db669..256e5ab23d22b7bace0414e745d4f8ff55f80ebe 100644 (file)
@@ -57,9 +57,9 @@ krb5_scc_close(id)
             closeval = KRB5_OK;
                 
      }
-     xfree (data->filename);
-     xfree (data);
-     xfree (id);
+     krb5_xfree (data->filename);
+     krb5_xfree (data);
+     krb5_xfree (id);
 
      return closeval;
 }
index 01ee482fc5d28a85f931f56adb6b5107e5ba97f4..0eb91180eff52c78ad267b266025cb0f16641ec5 100644 (file)
@@ -53,7 +53,7 @@ krb5_scc_end_seq_get(id, cursor)
     int ret = KRB5_OK;
 /*    MAYBE_CLOSE (id, ret);*/
 
-    xfree((krb5_scc_cursor *) *cursor);
+    krb5_xfree((krb5_scc_cursor *) *cursor);
 
     return ret;
 }
index b9b7ff44bebe93325549df6e4ba9e83aa747c56c..89c6a14bc27a94d8d325e0e123df70feee9190d9 100644 (file)
@@ -79,15 +79,15 @@ krb5_scc_generate_new (id)
 
      lid->data = (krb5_pointer) malloc(sizeof(krb5_scc_data));
      if (lid->data == NULL) {
-         xfree(lid);
+         krb5_xfree(lid);
          return KRB5_CC_NOMEM;
      }
 
      ((krb5_scc_data *) lid->data)->filename = (char *)
          malloc(strlen(scratch) + 1);
      if (((krb5_scc_data *) lid->data)->filename == NULL) {
-         xfree(((krb5_scc_data *) lid->data));
-         xfree(lid);
+         krb5_xfree(((krb5_scc_data *) lid->data));
+         krb5_xfree(lid);
          return KRB5_CC_NOMEM;
      }
 
@@ -124,8 +124,8 @@ krb5_scc_generate_new (id)
         return KRB5_OK;
      }
 err_out:
-     xfree(((krb5_scc_data *) lid->data)->filename);
-     xfree(((krb5_scc_data *) lid->data));
-     xfree(lid);
+     krb5_xfree(((krb5_scc_data *) lid->data)->filename);
+     krb5_xfree(((krb5_scc_data *) lid->data));
+     krb5_xfree(lid);
      return retcode;
 }
index a8eedc0500c5bd5bd56436bf842a7d9f59e80ff6..998115f0c31bac5d26db39d8c5abb984b5eaff8b 100644 (file)
@@ -204,18 +204,18 @@ krb5_scc_read_keyblock(id, keyblock)
                 ((krb5_scc_data *) id->data)->file);
 
      if ((ret == 0) && errno) {
-        xfree(keyblock->contents);
+        krb5_xfree(keyblock->contents);
         return krb5_scc_interpret(errno);
      }
      if (ret != (keyblock->length)*sizeof(krb5_octet)) {
-        xfree(keyblock->contents);
+        krb5_xfree(keyblock->contents);
         return KRB5_CC_END;
      }
 
      return KRB5_OK;
  errout:
      if (keyblock->contents)
-        xfree(keyblock->contents);
+        krb5_xfree(keyblock->contents);
      return kret;
 }
 
@@ -240,18 +240,18 @@ krb5_scc_read_data(id, data)
      ret = fread((char *)data->data, 1,
                 data->length, ((krb5_scc_data *) id->data)->file);
      if ((ret == 0) && errno) {
-        xfree(data->data);
+        krb5_xfree(data->data);
         return krb5_scc_interpret(errno);
      }
      if (ret != data->length) {
-        xfree(data->data);
+        krb5_xfree(data->data);
         return KRB5_CC_END;
      }
      data->data[data->length] = 0; /* Null terminate just in case.... */
      return KRB5_OK;
  errout:
      if (data->data)
-        xfree(data->data);
+        krb5_xfree(data->data);
      return kret;
 }
 
@@ -279,17 +279,17 @@ krb5_scc_read_addr(id, addr)
      ret = fread((char *)addr->contents, 1, (addr->length)*sizeof(krb5_octet),
                 ((krb5_scc_data *) id->data)->file);
      if ((ret == 0) && errno) {
-         xfree(addr->contents);
+         krb5_xfree(addr->contents);
          return krb5_scc_interpret(errno);
      }
      if (ret != (addr->length)*sizeof(krb5_octet)) {
-         xfree(addr->contents);
+         krb5_xfree(addr->contents);
          return KRB5_CC_END;
      }
      return KRB5_OK;
  errout:
      if (addr->contents)
-        xfree(addr->contents);
+        krb5_xfree(addr->contents);
      return kret;
 }
 
@@ -414,16 +414,16 @@ krb5_scc_read_authdatum(id, a)
                 (a->length)*sizeof(krb5_octet),
                 ((krb5_scc_data *) id->data)->file);
     if ((ret == 0) && errno) {
-       xfree(a->contents);
+       krb5_xfree(a->contents);
        return krb5_scc_interpret(errno);
     }
     if (ret != (a->length)*sizeof(krb5_octet)) {
-       xfree(a->contents);
+       krb5_xfree(a->contents);
        return KRB5_CC_END;
     }
     return KRB5_OK;
 errout:
     if (a->contents)
-       xfree(a->contents);
+       krb5_xfree(a->contents);
     return kret;
 }
index 53780458f613886b77d2cd93aa921b4472674953..aebc738b28283a78203501bb82e90be5dfc3af8a 100644 (file)
@@ -69,7 +69,7 @@ krb5_scc_resolve (id, residual)
      
      lid->data = (krb5_pointer) malloc(sizeof(krb5_scc_data));
      if (lid->data == NULL) {
-         xfree(lid);
+         krb5_xfree(lid);
          return KRB5_CC_NOMEM;
      }
 
@@ -77,8 +77,8 @@ krb5_scc_resolve (id, residual)
          malloc(strlen(residual) + 1);
 
      if (((krb5_scc_data *) lid->data)->filename == NULL) {
-         xfree(((krb5_scc_data *) lid->data));
-         xfree(lid);
+         krb5_xfree(((krb5_scc_data *) lid->data));
+         krb5_xfree(lid);
          return KRB5_CC_NOMEM;
      }
 
index a10fc120989cc950ee9f4f3a28d7c69cf0bac0cf..38109751ac4d0b5a2754dea4d97d7f9322ee9ab7 100644 (file)
@@ -38,7 +38,7 @@ krb5_free_address(val)
 krb5_address *val;
 {
     if (val->contents)
-       xfree(val->contents);
-    xfree(val);
+       krb5_xfree(val->contents);
+    krb5_xfree(val);
     return;
 }
index 70175798593f4b4b179ccc6c003fe04f6bd2eed8..3e40d92b9d8a29afff27591c52b179cde5767d3f 100644 (file)
@@ -41,9 +41,9 @@ krb5_address **val;
 
     for (temp = val; *temp; temp++) {
        if ((*temp)->contents)
-           xfree((*temp)->contents);
-       xfree(*temp);
+           krb5_xfree((*temp)->contents);
+       krb5_xfree(*temp);
     }
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 46d2e8d1f12b8decae864df55f86f137c2bd6efb..a88a2f6992741642308925d790e75057e15286e5 100644 (file)
@@ -38,7 +38,7 @@ krb5_free_ap_rep(val)
 register krb5_ap_rep *val;
 {
     if (val->enc_part.ciphertext.data)
-       xfree(val->enc_part.ciphertext.data);
-    xfree(val);
+       krb5_xfree(val->enc_part.ciphertext.data);
+    krb5_xfree(val);
     return;
 }
index f9c216b9ba4cd607d8fa9a1bd4f54a68a4836903..695bfd149a61abee7c3c3e316ccb3673b39d7133 100644 (file)
@@ -40,7 +40,7 @@ register krb5_ap_req *val;
     if (val->ticket)
        krb5_free_ticket(val->ticket);
     if (val->authenticator.ciphertext.data)
-       xfree(val->authenticator.ciphertext.data);
-    xfree(val);
+       krb5_xfree(val->authenticator.ciphertext.data);
+    krb5_xfree(val);
     return;
 }
index b75c1198e295c340d12ee1ef7db783a491861824..bd951762d46510fb41a5c0cf81d74300feecfcaf 100644 (file)
@@ -39,6 +39,6 @@ krb5_ap_rep_enc_part *val;
 {
     if (val->subkey)
        krb5_free_keyblock(val->subkey);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 06cdfa276bf90277785264577ae72919ba876b92..975ae2926a18b4e5b6e6da8b5548f986b1dce047 100644 (file)
@@ -41,9 +41,9 @@ krb5_authdata **val;
 
     for (temp = val; *temp; temp++) {
        if ((*temp)->contents)
-           xfree((*temp)->contents);
-       xfree(*temp);
+           krb5_xfree((*temp)->contents);
+       krb5_xfree(*temp);
     }
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 4e399b567c68cc30e8a48bd2b1316a51b9cbd7a1..07e27facc325f1ccbb781edde3bb4759c90e0efe 100644 (file)
@@ -46,6 +46,6 @@ krb5_authenticator *val;
        krb5_free_keyblock(val->subkey);
     if (val->authorization_data)        
        krb5_free_authdata(val->authorization_data);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index d293c96bd3f8ba376b9bd5cb800eca3a1fb68621..9cbd5ed8adcb0df027252b008825bbdf5b7cda3e 100644 (file)
@@ -38,7 +38,7 @@ krb5_free_checksum(val)
 register krb5_checksum *val;
 {
     if (val->contents)
-       xfree(val->contents);
-    xfree(val);
+       krb5_xfree(val->contents);
+    krb5_xfree(val);
     return;
 }
index b6401765179edeec760303aacf5ecf38a288dbd9..3e32878643f58ee5ed23426a487a86a7ca0544e9 100644 (file)
@@ -40,7 +40,7 @@ register krb5_cred *val;
     if (val->tickets)
         krb5_free_tickets(val->tickets);
     if (val->enc_part.ciphertext.data)
-       xfree(val->enc_part.ciphertext.data);
-    xfree(val);
+       krb5_xfree(val->enc_part.ciphertext.data);
+    krb5_xfree(val);
     return;
 }
index e5b73b95ad5f696c628d587a06acd9b936449af2..4a3b5065297ac8c388be279622d7e00a35e0e071 100644 (file)
@@ -48,12 +48,12 @@ krb5_creds *val;
        krb5_free_principal(val->server);
     if (val->keyblock.contents) {
        memset((char *)val->keyblock.contents, 0, val->keyblock.length);
-       xfree(val->keyblock.contents);
+       krb5_xfree(val->keyblock.contents);
     }
     if (val->ticket.data)
-       xfree(val->ticket.data);
+       krb5_xfree(val->ticket.data);
     if (val->second_ticket.data)
-       xfree(val->second_ticket.data);
+       krb5_xfree(val->second_ticket.data);
     if (val->addresses)
        krb5_free_addresses(val->addresses);
     if (val->authdata)
index 46a3df1d957f11fe2b8609741367b92eb61568bd..5ca6102d0338ab54ff724058e18695307af1011a 100644 (file)
@@ -53,8 +53,8 @@ register krb5_cred_enc_part *val;
          krb5_free_principal((*temp)->server);
        if ((*temp)->caddrs)
          krb5_free_addresses((*temp)->caddrs);
-       xfree((*temp));
+       krb5_xfree((*temp));
     }
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 9b5a5e5c56c29027958ac26b34a59104135f423c..5fcbc918323dc117304be1045fdac6f761a2e9a7 100644 (file)
@@ -38,6 +38,6 @@ krb5_free_creds(val)
 krb5_creds *val;
 {
     krb5_free_cred_contents(val);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 28fda6c454d81b201351b9794b446784cc450e9b..a5ed6234fafff07a835451511491cd1433efd641 100644 (file)
@@ -45,6 +45,6 @@ register krb5_enc_kdc_rep_part *val;
        krb5_free_principal(val->server);
     if (val->caddrs)
        krb5_free_addresses(val->caddrs);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 9a38270413c2dd6550585966981c0e73dc55fd2b..c0fdcd90fd7343cd4a5f4d27ea20cfc72ab3302d 100644 (file)
@@ -42,11 +42,11 @@ krb5_enc_tkt_part *val;
     if (val->client)
        krb5_free_principal(val->client);
     if (val->transited.tr_contents.data)
-       xfree(val->transited.tr_contents.data);
+       krb5_xfree(val->transited.tr_contents.data);
     if (val->caddrs)
        krb5_free_addresses(val->caddrs);
     if (val->authorization_data)
        krb5_free_authdata(val->authorization_data);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 219412e750098e643ff1918b263bda01cb5e37a7..4cb7d85ab46adc4c92f20f32cdf9b3875e1048a2 100644 (file)
@@ -42,9 +42,9 @@ register krb5_error *val;
     if (val->server)
        krb5_free_principal(val->server);
     if (val->text.data)
-       xfree(val->text.data);
+       krb5_xfree(val->text.data);
     if (val->e_data.data)
-       xfree(val->e_data.data);
-    xfree(val);
+       krb5_xfree(val->e_data.data);
+    krb5_xfree(val);
     return;
 }
index b4a8bf873775e36dd012450179026a77c4f33975..19791c9bcd4bd6debfe776b854bf3dea60b25af5 100644 (file)
@@ -44,9 +44,9 @@ krb5_kdc_rep *val;
     if (val->ticket)
        krb5_free_ticket(val->ticket);
     if (val->enc_part.ciphertext.data)
-       xfree(val->enc_part.ciphertext.data);
+       krb5_xfree(val->enc_part.ciphertext.data);
     if (val->enc_part2)
        krb5_free_enc_kdc_rep_part(val->enc_part2);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 489fe85597efe940a7df15f19278316f8bcdf7a3..177ef087e971eef3284c16dd96a8b260c9d66676 100644 (file)
@@ -44,15 +44,15 @@ krb5_kdc_req *val;
     if (val->server)
        krb5_free_principal(val->server);
     if (val->etype)
-       xfree(val->etype);
+       krb5_xfree(val->etype);
     if (val->addresses)
        krb5_free_addresses(val->addresses);
     if (val->authorization_data.ciphertext.data)
-       xfree(val->authorization_data.ciphertext.data);
+       krb5_xfree(val->authorization_data.ciphertext.data);
     if (val->unenc_authdata)
        krb5_free_authdata(val->unenc_authdata);
     if (val->second_ticket)
        krb5_free_tickets(val->second_ticket);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 14d395331ac73480cf8d2fe0491abb966a978e50..18dbcc289aa0901782902ba0231613d67c49a55d 100644 (file)
@@ -39,8 +39,8 @@ register krb5_keyblock *val;
 {
     if (val->contents) {
        memset((char *)val->contents, 0, val->length);
-       xfree(val->contents);
+       krb5_xfree(val->contents);
     }
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 240cde482cf8f5957efcaceba5573aed5afeb250..e731d1d93b89b3d75c7b71b69c3ddc74b7a2ee82 100644 (file)
@@ -40,7 +40,7 @@ krb5_last_req_entry **val;
     register krb5_last_req_entry **temp;
 
     for (temp = val; *temp; temp++)
-       xfree(*temp);
-    xfree(val);
+       krb5_xfree(*temp);
+    krb5_xfree(val);
     return;
 }
index 86523ac2de7027383fa9b77213d3fdab59219031..384fbfb4e69c130742c99d97a6c18c8bb8113de8 100644 (file)
@@ -41,9 +41,9 @@ krb5_pa_data **val;
 
     for (temp = val; *temp; temp++) {
        if ((*temp)->contents)
-           xfree((*temp)->contents);
-       xfree(*temp);
+           krb5_xfree((*temp)->contents);
+       krb5_xfree(*temp);
     }
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 802707efc15db06e67ad3a4cba7e2a07114d4761..cf8a93397415a0886a8189fb3eada229b473192a 100644 (file)
@@ -42,10 +42,10 @@ krb5_principal val;
     if (val->data) {
        while(--i >= 0)
            free(krb5_princ_component(val, i)->data);
-       xfree(val->data);
+       krb5_xfree(val->data);
     }
     if (val->realm.data)
-       xfree(val->realm.data);
-    xfree(val);
+       krb5_xfree(val->realm.data);
+    krb5_xfree(val);
     return;
 }
index 28f7e1d50854108ad80e2e24fe8ff0fb07c2c90d..6ad616a8f92c8a77232560b7fd9eaeff8e244ef9 100644 (file)
@@ -38,7 +38,7 @@ krb5_free_priv(val)
 register krb5_priv *val;
 {
     if (val->enc_part.ciphertext.data)
-       xfree(val->enc_part.ciphertext.data);
-    xfree(val);
+       krb5_xfree(val->enc_part.ciphertext.data);
+    krb5_xfree(val);
     return;
 }
index 0d659702533e8b2fb3729a1a134548351e383611..a645344cab57a4eba144fe912c689b89a3019160 100644 (file)
@@ -38,11 +38,11 @@ krb5_free_priv_enc_part(val)
 register krb5_priv_enc_part *val;
 {
     if (val->user_data.data)
-       xfree(val->user_data.data);
+       krb5_xfree(val->user_data.data);
     if (val->r_address)
        krb5_free_address(val->r_address);
     if (val->s_address)
        krb5_free_address(val->s_address);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 95d1a3125fe25e5333515a34dce45a8a0bda6246..9688101d2afc2ce19af6ae9507efa023229f98a5 100644 (file)
@@ -39,6 +39,6 @@ krb5_pwd_data *val;
 {
     if (val->element)
        krb5_free_pwd_sequences(val->element);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 65b072c34fab466c2204ccf3745bbff478aebaed..4f51a7d257435a6c9512d8f11d756c08ae8a9336 100644 (file)
@@ -38,8 +38,8 @@ krb5_free_pwd_sequences(val)
 passwd_phrase_element **val;
 {
     if ((*val)->passwd)
-       xfree((*val)->passwd);
+       krb5_xfree((*val)->passwd);
     if ((*val)->phrase)
-       xfree((*val)->phrase);
+       krb5_xfree((*val)->phrase);
     return;
 }
index b884236455ad413fd65698925ed4a1f9e2f0aa22..b07b789cf72fcd0bf038933f354016d7c2d8bfef 100644 (file)
@@ -38,13 +38,13 @@ krb5_free_safe(val)
 register krb5_safe *val;
 {
     if (val->user_data.data)
-       xfree(val->user_data.data);
+       krb5_xfree(val->user_data.data);
     if (val->r_address)
        krb5_free_address(val->r_address);
     if (val->s_address)
        krb5_free_address(val->s_address);
     if (val->checksum)
        krb5_free_checksum(val->checksum);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 3cf91f69b5e663aacac3252a7994f1858195a186..ac363ccafdcb9a05b16eb8442cd9c4859d850467 100644 (file)
@@ -41,5 +41,5 @@ krb5_creds **tgts;
     register krb5_creds **tgtpp;
     for (tgtpp = tgts; *tgtpp; tgtpp++)
        krb5_free_creds(*tgtpp);
-    xfree(tgts);
+    krb5_xfree(tgts);
 }
index 839dfb289bedfd9d9a45010234dfe35e7c933f4e..8cf3e98c957d2a2799c0c2a115eb47191e3a5955 100644 (file)
@@ -40,9 +40,9 @@ krb5_ticket *val;
     if (val->server)
        krb5_free_principal(val->server);
     if (val->enc_part.ciphertext.data)
-       xfree(val->enc_part.ciphertext.data);
+       krb5_xfree(val->enc_part.ciphertext.data);
     if (val->enc_part2)
        krb5_free_enc_tkt_part(val->enc_part2);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 6a61d697e9c41f9db1bf43bfda2844a44f1c20d1..f4b768ace4788099e9532e1407f72ab6262cc192 100644 (file)
@@ -41,6 +41,6 @@ krb5_ticket **val;
 
     for (temp = val; *temp; temp++)
         krb5_free_ticket(*temp);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 3152eeb3ee01262de206b7297ca2bfd5e1866924..732892e7affb3720203f18a80eea200ed8fbfa25 100644 (file)
@@ -41,6 +41,6 @@ krb5_tkt_authent *val;
            krb5_free_ticket(val->ticket);
     if (val->authenticator)
            krb5_free_authenticator(val->authenticator);
-    xfree(val);
+    krb5_xfree(val);
     return;
 }
index 27910f52de689cc6099913a02023314c180779cd..21c7e87701a7c5c230670a81855e883828d26736 100644 (file)
@@ -47,9 +47,9 @@ krb5_ktfile_close(id)
    * This routine should undo anything done by krb5_ktfile_resolve().
    */
 {
-    xfree(KTFILENAME(id));
-    xfree(id->data);
+    krb5_xfree(KTFILENAME(id));
+    krb5_xfree(id->data);
     id->ops = 0;
-    xfree(id);
+    krb5_xfree(id);
     return (0);
 }
index c4f1d62db83a6622acad7bd9535a8cb304b873b4..e0ac73b98bae0009c630ccb6b1de28a006dcd201 100644 (file)
@@ -40,6 +40,6 @@ krb5_ktfile_end_get(id, cursor)
 krb5_keytab id;
 krb5_kt_cursor *cursor;
 {
-    xfree(*cursor);
+    krb5_xfree(*cursor);
     return krb5_ktfileint_close(id);
 }
index 35bd810b0f0ff1f0bdf53dd406c0d655fa318aa4..f46b9a826100f44a73c5765312d8c0fba552f5e6 100644 (file)
@@ -77,7 +77,7 @@ OLDDECLARG(krb5_keytab_entry *, entry)
     if (!(kerror = krb5_ktfileint_close(id))) {
        if (cur_entry) {
            *entry = *cur_entry;
-           xfree(cur_entry);
+           krb5_xfree(cur_entry);
        } else
            kerror = KRB5_KT_NOTFOUND;
     } else
index 7482f935f204008ce0d90acca8c1f0a9e90ab185..80edf09a40115d0e4a439c20ef22a635cb30c826 100644 (file)
@@ -51,6 +51,6 @@ krb5_kt_cursor *cursor;
        return kerror;
     *fileoff = ftell(KTFILEP(id));
     *entry = *cur_entry;
-    xfree(cur_entry);
+    krb5_xfree(cur_entry);
     return 0;
 }
index bf6ea489f997419146891f49ab812c3fd4516ac7..10364fd869bd3e94e170f61202dd8a4df38526f0 100644 (file)
@@ -48,13 +48,13 @@ krb5_ktfile_resolve(name, id)
     
     (*id)->ops = &krb5_ktf_ops;
     if ((data = (krb5_ktfile_data *)malloc(sizeof(krb5_ktfile_data))) == NULL) {
-       xfree(*id);
+       krb5_xfree(*id);
        return(ENOMEM);
     }
 
     if ((data->name = (char *)calloc(strlen(name) + 1, sizeof(char))) == NULL) {
-       xfree(data);
-       xfree(*id);
+       krb5_xfree(data);
+       krb5_xfree(*id);
        return(ENOMEM);
     }
 
index 0127070a2af23b3bdeb9cb49440a8c70b4e56e8b..aa875c4107b8e08a9777f3bac54c705f4822df14 100644 (file)
@@ -48,13 +48,13 @@ krb5_ktfile_wresolve(name, id)
     
     (*id)->ops = &krb5_ktf_writable_ops;
     if ((data = (krb5_ktfile_data *)malloc(sizeof(krb5_ktfile_data))) == NULL) {
-       xfree(*id);
+       krb5_xfree(*id);
        return(ENOMEM);
     }
 
     if ((data->name = (char *)calloc(strlen(name) + 1, sizeof(char))) == NULL) {
-       xfree(data);
-       xfree(*id);
+       krb5_xfree(data);
+       krb5_xfree(*id);
        return(ENOMEM);
     }
 
index e07d1515ed6565a9a2d87a05cce9011bec9ce9b9..28dcae6997e6947c3ad4f7c2ce74af369c573d62 100644 (file)
@@ -39,6 +39,6 @@ krb5_keytab_entry *entry;
 {
     krb5_free_principal(entry->principal);
     memset((char *)entry->key.contents, 0, entry->key.length);
-    xfree(entry->key.contents);
+    krb5_xfree(entry->key.contents);
     return 0;
 }
index 4e7837435a6210c0f7aafee97c550e441d310eba..5df39f5b3ba9b4d54d21669eae59075712779912 100644 (file)
@@ -78,15 +78,15 @@ va_dcl
        return ENOMEM;
     princ_ret = (krb5_principal) malloc(sizeof(krb5_principal_data));
     if (!princ_ret) {
-       xfree(princ_data);
+       krb5_xfree(princ_data);
        return ENOMEM;
     }
     princ_ret->data = princ_data;
     princ_ret->length = count;
     tmpdata = malloc(rlen+1);
     if (!tmpdata) {
-       xfree(princ_data);
-       xfree(princ_ret);
+       krb5_xfree(princ_data);
+       krb5_xfree(princ_ret);
        return ENOMEM;
     }  
     krb5_princ_set_realm_length(princ_ret, rlen);
@@ -117,9 +117,9 @@ va_dcl
 
 free_out:
     while (i-- >= 0)
-       xfree(princ_data[i].data);
-    xfree(princ_data);
-    xfree(princ_ret);
+       krb5_xfree(princ_data[i].data);
+    krb5_xfree(princ_data);
+    krb5_xfree(princ_ret);
     va_end(ap);
     return ENOMEM;
 }
index f56fefb0e6140edf79b367c61e44d8a58ba5faa9..62aa8d8367f641deecd2e9242f3c5905836d32f9 100644 (file)
@@ -82,9 +82,9 @@ va_list ap;
            if (!p_tmp) {
            free_out:
                    while (--i >= 0)
-                       xfree(data[i].data);
-                   xfree(data);
-                   xfree(tmpdata);
+                       krb5_xfree(data[i].data);
+                   krb5_xfree(data);
+                   krb5_xfree(tmpdata);
                    return (ENOMEM);
            }
            count *= 2;
index 623b9e3a53e1b3e4033547b77efbe5f0b7abdda3..b1551395a7452a52f657c43a53832c4636bc7694 100644 (file)
@@ -45,7 +45,7 @@ krb5_address **outad;
        return ENOMEM;
     *tmpad = *inad;
     if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
-       xfree(tmpad);
+       krb5_xfree(tmpad);
        return ENOMEM;
     }
     memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
index 28a51387394743bfe9f522a9c33ee546b87b50c2..6fc5684adf9ace971d9dfcc1a68b25b2941cfb7d 100644 (file)
@@ -48,24 +48,24 @@ krb5_authenticator **authto;
 
     retval = krb5_copy_principal(authfrom->client, &tempto->client);
     if (retval) {
-       xfree(tempto);
+       krb5_xfree(tempto);
        return retval;
     }
     
     if (authfrom->checksum &&
        (retval = krb5_copy_checksum(authfrom->checksum, &tempto->checksum))) {
            krb5_free_principal(tempto->client);    
-           xfree(tempto);
+           krb5_xfree(tempto);
            return retval;
     }
     
     if (authfrom->subkey) {
            retval = krb5_copy_keyblock(authfrom->subkey, &tempto->subkey);
            if (retval) {
-                   xfree(tempto->subkey);
+                   krb5_xfree(tempto->subkey);
                    krb5_free_checksum(tempto->checksum);
                    krb5_free_principal(tempto->client);    
-                   xfree(tempto);
+                   krb5_xfree(tempto);
                    return retval;
            }
     }
@@ -74,11 +74,11 @@ krb5_authenticator **authto;
                retval = krb5_copy_authdata(authfrom->authorization_data,
                                    &tempto->authorization_data);
                if (retval) {
-                   xfree(tempto->subkey);
+                   krb5_xfree(tempto->subkey);
                    krb5_free_checksum(tempto->checksum);
                    krb5_free_principal(tempto->client);    
                    krb5_free_authdata(tempto->authorization_data);
-                   xfree(tempto);
+                   krb5_xfree(tempto);
                    return retval;
                }
     }
index a36aad4744627318cf1793869c685656bedc4349..8c6e7371850e06c27b3ce7b471fe6f7a94508a82 100644 (file)
@@ -45,7 +45,7 @@ krb5_authdata **outad;
        return ENOMEM;
     *tmpad = *inad;
     if (!(tmpad->contents = (krb5_octet *)malloc(inad->length))) {
-       xfree(tmpad);
+       krb5_xfree(tmpad);
        return ENOMEM;
     }
     memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
index 8b7a0d903ee402ece20b519fb4a548f783d69224..a6f42ae6229f172ceeffb7552b90df46727a7f65 100644 (file)
@@ -47,7 +47,7 @@ krb5_checksum **ckto;
 
     if (!(tempto->contents =
          (krb5_octet *)malloc(tempto->length))) {
-       xfree(tempto);
+       krb5_xfree(tempto);
        return ENOMEM;
     }
     memcpy((char *) tempto->contents, (char *) ckfrom->contents,
index 3871d64cdb5272a310d634f450d70166ec5e38c9..45837087f8fb6f0b22a11357de8b8b6a4909be75 100644 (file)
@@ -68,13 +68,13 @@ krb5_creds **outcred;
     if (retval)
        goto cleanaddrs;
     tempcred->ticket = *scratch;
-    xfree(scratch);
+    krb5_xfree(scratch);
     retval = krb5_copy_data(&incred->second_ticket, &scratch);
     if (retval)
        goto cleanticket;
 
     tempcred->second_ticket = *scratch;
-    xfree(scratch);
+    krb5_xfree(scratch);
 
     retval = krb5_copy_authdata(incred->authdata,&tempcred->authdata);
     if (retval)
@@ -90,12 +90,12 @@ krb5_creds **outcred;
  cleanaddrs:
     krb5_free_addresses(tempcred->addresses);
  cleanblock:
-    xfree(tempcred->keyblock.contents);
+    krb5_xfree(tempcred->keyblock.contents);
  cleanserver:
     krb5_free_principal(tempcred->server);
  cleanclient:
     krb5_free_principal(tempcred->client);
  cleanlast:
-    xfree(tempcred);
+    krb5_xfree(tempcred);
     return retval;
 }
index f86d04c491b88d1fbf169aee2a2c200106829fe2..d192ec2538ef02f1964615566564650de6d337ea 100644 (file)
@@ -54,7 +54,7 @@ krb5_data **outdata;
     tempdata->length = indata->length;
     if (tempdata->length) {
        if (!(tempdata->data = malloc(tempdata->length))) {
-           xfree(tempdata);
+           krb5_xfree(tempdata);
            return ENOMEM;
        }
        memcpy((char *)tempdata->data, (char *)indata->data, tempdata->length);
index b20206fe273895c80e9cf709ae6ddab95a0f48b9..444729d5a8f84bbc468080d001a1b4d2677d5040 100644 (file)
@@ -47,7 +47,7 @@ krb5_keyblock **to;
                return ENOMEM;
        *new_key = *from;
        if (!(new_key->contents = (krb5_octet *)malloc(new_key->length))) {
-               xfree(new_key);
+               krb5_xfree(new_key);
                return(ENOMEM);
        }
        memcpy((char *)new_key->contents, (char *)from->contents,
index 660f1945d8ae86f26c075953a38b47b9810d2151..8871d1b088025ac5b50e4d02c20337499762e952 100644 (file)
@@ -48,13 +48,13 @@ krb5_enc_tkt_part **partto;
     retval = krb5_copy_keyblock(partfrom->session,
                                &tempto->session);
     if (retval) {
-       xfree(tempto);
+       krb5_xfree(tempto);
        return retval;
     }
     retval = krb5_copy_principal(partfrom->client, &tempto->client);
     if (retval) {
        krb5_free_keyblock(tempto->session);
-       xfree(tempto);
+       krb5_xfree(tempto);
        return retval;
     }
     tempto->transited = partfrom->transited;
@@ -66,7 +66,7 @@ krb5_enc_tkt_part **partto;
        if (!tempto->transited.tr_contents.data) {
            krb5_free_principal(tempto->client);
            krb5_free_keyblock(tempto->session);
-           xfree(tempto);
+           krb5_xfree(tempto);
            return retval;
        }
        memcpy((char *)tempto->transited.tr_contents.data,
@@ -76,10 +76,10 @@ krb5_enc_tkt_part **partto;
 
     retval = krb5_copy_addresses(partfrom->caddrs, &tempto->caddrs);
     if (retval) {
-       xfree(tempto->transited.tr_contents.data);
+       krb5_xfree(tempto->transited.tr_contents.data);
        krb5_free_principal(tempto->client);
        krb5_free_keyblock(tempto->session);
-       xfree(tempto);
+       krb5_xfree(tempto);
        return retval;
     }
     if (partfrom->authorization_data) {
@@ -87,10 +87,10 @@ krb5_enc_tkt_part **partto;
                                    &tempto->authorization_data);
        if (retval) {
            krb5_free_addresses(tempto->caddrs);
-           xfree(tempto->transited.tr_contents.data);
+           krb5_xfree(tempto->transited.tr_contents.data);
            krb5_free_principal(tempto->client);
            krb5_free_keyblock(tempto->session);
-           xfree(tempto);
+           krb5_xfree(tempto);
            return retval;
        }
     }
@@ -116,16 +116,16 @@ krb5_ticket **pto;
     retval = krb5_copy_data(&from->enc_part.ciphertext, &scratch);
     if (retval) {
        krb5_free_principal(tempto->server);
-       xfree(tempto);
+       krb5_xfree(tempto);
        return retval;
     }
     tempto->enc_part.ciphertext = *scratch;
-    xfree(scratch);
+    krb5_xfree(scratch);
     retval = krb5_copy_enc_tkt_part(from->enc_part2, &tempto->enc_part2);
     if (retval) {
-       xfree(tempto->enc_part.ciphertext.data);
+       krb5_xfree(tempto->enc_part.ciphertext.data);
        krb5_free_principal(tempto->server);
-       xfree(tempto);
+       krb5_xfree(tempto);
        return retval;
     }  
     *pto = tempto;
index 3d11b63b8b5d21a100ce5788889b704e50baddc6..84aa4493b2c2b94d8470554db48a5d35e90d8bb1 100644 (file)
@@ -93,7 +93,7 @@ krb5_free_data(scratch); }
     if (!(scratch->data = realloc(scratch->data,
                                  dec_rep->enc_part.ciphertext.length))) {
        /* may destroy scratch->data */
-       xfree(scratch);
+       krb5_xfree(scratch);
        return ENOMEM;
     }
     memset(scratch->data + scratch->length, 0,
index 636146ef6d976efaf61546b8dc67d911ca4cfad5..80d4fc278e781cbeb8a252477fb2ce280469619b 100644 (file)
@@ -81,7 +81,7 @@ krb5_free_data(scratch); }
     if (!(scratch->data = realloc(scratch->data,
                                  dec_ticket->enc_part.ciphertext.length))) {
        /* may destroy scratch->data */
-       xfree(scratch);
+       krb5_xfree(scratch);
        return ENOMEM;
     }
     memset(scratch->data + scratch->length, 0,
index 82a5ee8a661ae8158d8cf7fc5bba3adcc157b1cc..65bf747d3422688e4f829a3d7dcc90d18ff77250 100644 (file)
@@ -42,5 +42,5 @@ krb5_principal *realms;
        krb5_free_principal(*nrealms);
        nrealms++;
     }
-    xfree(realms);
+    krb5_xfree(realms);
 }
index d917be4ff78cca3e5cd474c18e0c678ba99ae066..2aca318bcf6c6db262d5394dbfab53ce42c11a11 100644 (file)
@@ -181,7 +181,7 @@ register krb5_creds * cred;
     }
 
     cred->ticket = *scratch;
-    xfree(scratch);
+    krb5_xfree(scratch);
 
     krb5_free_kdc_rep(dec_rep);
     return 0;
index 0614e6859ef20e0e7b7f66de0f8c1fd88a2ee759..64d38d9b7d88d0173d610533b052e1fb79e298f1 100644 (file)
@@ -215,7 +215,7 @@ OLDDECLARG(krb5_creds *, cred)
     }
 
     cred->ticket = *scratch;
-    xfree(scratch);
+    krb5_xfree(scratch);
 
     krb5_free_kdc_rep(dec_rep);
     return retval;
index 1aa0b62a2b6be0c6a509fc28b41c0e47e11ac88f..d4ee4b826e6275399c3829bb02b12585af77cc0b 100644 (file)
@@ -83,7 +83,7 @@ krb5_int32 *seqno;
     }
     outtmp = (krb5_octet *)malloc(esize);
     if (!outtmp) {
-       xfree(intmp);
+       krb5_xfree(intmp);
        krb5_free_keyblock(subkey);
        return ENOMEM;
     }
@@ -118,8 +118,8 @@ krb5_int32 *seqno;
     (void) krb5_finish_key(&eblock);
  cleanup:
     krb5_free_keyblock(subkey);
-    xfree(intmp);
-    xfree(outtmp);
+    krb5_xfree(intmp);
+    krb5_xfree(outtmp);
     return retval;
 }
 
index b992e1daeeda42a0d9f315d7697b3468c20fcc60..e1124e0d4fa4fd41744166ab35fb5fcfc0375843 100644 (file)
@@ -57,7 +57,7 @@ krb5_keyblock **subkey;
        
     if (retval = krb5_random_key(&eblock, random_state, subkey)) {
        (void) krb5_finish_random_key(&eblock, &random_state);
-       xfree(*subkey);
+       krb5_xfree(*subkey);
        return retval;
     }  
     /* ignore the error if any, since we've already gotten the key out */
index 2b8b9f776bee336ab8cf9cf8703253b90aafd539..320a3b2080742fb2f983b695edebec73c6cef003 100644 (file)
@@ -208,7 +208,7 @@ OLDDECLARG(krb5_kdc_rep **, ret_as_reply)
        if (retval = decode_krb5_error(&reply, &err_reply)) {
            if (decrypt_key)
                krb5_free_keyblock(decrypt_key);
-           xfree(reply.data);
+           krb5_xfree(reply.data);
             return retval;              /* some other reply--??? */
        }
        /* it was an error */
@@ -225,23 +225,23 @@ OLDDECLARG(krb5_kdc_rep **, ret_as_reply)
        krb5_free_error(err_reply);
        if (decrypt_key)
            krb5_free_keyblock(decrypt_key);
-       xfree(reply.data);
+       krb5_xfree(reply.data);
        return retval;
     }
 
     if (!krb5_is_as_rep(&reply)) {
        if (decrypt_key)
            krb5_free_keyblock(decrypt_key);
-       xfree(reply.data);
+       krb5_xfree(reply.data);
        return KRB5KRB_AP_ERR_MSG_TYPE;
     }
     if (retval = decode_krb5_as_rep(&reply, &as_reply)) {
        if (decrypt_key)
            krb5_free_keyblock(decrypt_key);
-       xfree(reply.data);
+       krb5_xfree(reply.data);
        return retval;          /* some other reply--??? */
     }
-    xfree(reply.data);
+    krb5_xfree(reply.data);
     if (as_reply->msg_type != KRB5_AS_REP) {
        if (decrypt_key)
            krb5_free_keyblock(decrypt_key);
@@ -309,7 +309,7 @@ OLDDECLARG(krb5_kdc_rep **, ret_as_reply)
     }
 #define cleanup_key() {memset((char *)creds->keyblock.contents, 0,\
                             creds->keyblock.length); \
-                      xfree(creds->keyblock.contents); \
+                      krb5_xfree(creds->keyblock.contents); \
                       creds->keyblock.contents = 0; \
                       creds->keyblock.length = 0;}
 
@@ -333,13 +333,13 @@ OLDDECLARG(krb5_kdc_rep **, ret_as_reply)
        return retval;
     }  
     creds->ticket = *packet;
-    xfree(packet);
+    krb5_xfree(packet);
 
     /* store it in the ccache! */
     if (retval = krb5_cc_store_cred(ccache, creds)) {
        krb5_free_kdc_rep(as_reply);
        /* clean up the pieces */
-       xfree(creds->ticket.data);
+       krb5_xfree(creds->ticket.data);
        krb5_free_addresses(creds->addresses);
        cleanup_key();
        return retval;
index aa84038680e4d4d997266d58d38d07d0fa52c47f..712f2711990ac17326d1494c1f913b2eb1ed3b9c 100644 (file)
@@ -93,7 +93,7 @@ OLDDECLARG(krb5_pa_data **,padata)
        if (retval = krb5_read_password(krb5_default_pwd_prompt1,
                                        0,
                                        pwdbuf, &pwsize)) {
-           if (f_salt) xfree(salt.data);
+           if (f_salt) krb5_xfree(salt.data);
            return retval;
        }
        arg2 = *arg;
@@ -103,7 +103,7 @@ OLDDECLARG(krb5_pa_data **,padata)
     }
     *key = (krb5_keyblock *)malloc(sizeof(**key));
     if (!*key) {
-       if (f_salt) xfree(salt.data);
+       if (f_salt) krb5_xfree(salt.data);
        return ENOMEM;
     }    
     if (retval = (*krb5_keytype_array[type]->system->
@@ -111,11 +111,11 @@ OLDDECLARG(krb5_pa_data **,padata)
                                 *key,
                                 &arg->password,
                                  &salt)) {
-       xfree(*key);
-       if (f_salt) xfree(salt.data);
+       krb5_xfree(*key);
+       if (f_salt) krb5_xfree(salt.data);
        return(retval);
     }
-    if (f_salt) xfree(salt.data);
+    if (f_salt) krb5_xfree(salt.data);
     return 0;
 }
 
index 517f468f047debbe6fa0405cf9ab9d022af03428..0c8db227e5c2ad0bcd33ac60a996d47453d7457d 100644 (file)
@@ -83,7 +83,7 @@ OLDDECLARG(krb5_pa_data **,padata)
     else
        retval = krb5_copy_keyblock(&kt_ent.key, &realkey);
     if (retval) {
-       xfree(realkey);
+       krb5_xfree(realkey);
        cleanup();
        return retval;
     }
index 857a558d1a4dcb45ed76070179b6f39353458337..160c375520119f7d9d6c7bbe2e3c8b4056d70b6f 100644 (file)
@@ -54,6 +54,6 @@ krb5_data *enc_err;
     if (retval = encode_krb5_error(dec_err, &new_enc_err))
        return(retval);
     *enc_err = *new_enc_err;
-    xfree(new_enc_err);
+    krb5_xfree(new_enc_err);
     return 0;
 }
index defbd5ea35fe9766886997291ab4a4f6b95ff45b..0e9eca816440595e00a6c81eb9cdd47c3eae6702 100644 (file)
@@ -122,7 +122,7 @@ OLDDECLARG(krb5_data *, outbuf)
     if (!(scratch->data = realloc(scratch->data,
                                  privmsg.enc_part.ciphertext.length))) {
        /* may destroy scratch->data */
-       xfree(scratch);
+       krb5_xfree(scratch);
        return ENOMEM;
     }
     memset(scratch->data + scratch->length, 0,
@@ -193,13 +193,13 @@ OLDDECLARG(krb5_data *, outbuf)
        if (retval = krb5_rc_store(rcache, &replay)) {
            /* should we really error out here? XXX */
            cleanup_scratch();
-           xfree(replay.client);
+           krb5_xfree(replay.client);
            return retval;
        }
-       xfree(replay.client);
+       krb5_xfree(replay.client);
     }
     *outbuf = *scratch;
-    xfree(scratch);
+    krb5_xfree(scratch);
     return 0;
 
  clean_prockey:
index 82d0fa34781d1eb64b9de104bd2f95da1b544cc6..c84e39a79d6bb3a4482a4c84676d76fb5ffe55d5 100644 (file)
@@ -91,7 +91,7 @@ krb5_free_data(scratch); }
     if (!(scratch->data = realloc(scratch->data,
                                  reply.enc_part.ciphertext.length))) {
        /* may destroy scratch->data */
-       xfree(scratch);
+       krb5_xfree(scratch);
        return ENOMEM;
     }
     memset(scratch->data + scratch->length, 0,
@@ -132,7 +132,7 @@ reply.enc_part.ciphertext.length = 0; reply.enc_part.ciphertext.data = 0;}
 
     if (!(retval = encode_krb5_ap_rep(&reply, &toutbuf))) {
        *outbuf = *toutbuf;
-       xfree(toutbuf);
+       krb5_xfree(toutbuf);
     }
     cleanup_encpart();
     return retval;
index 061479a9362158f4d1e85feede9cde94c17f539e..476216cda4926f1cfe01e848d5b3e94b7fb0ea85 100644 (file)
@@ -128,17 +128,17 @@ OLDDECLARG(krb5_data *, outbuf)
                                         scratch->length,
                                         (krb5_pointer) key->contents,
                                         key->length, &safe_checksum)) {
-       xfree(safe_checksum.contents);
+       krb5_xfree(safe_checksum.contents);
        clean_scratch();
        return retval;
     }
     safemsg.checksum = &safe_checksum;
     clean_scratch();
     if (retval = encode_krb5_safe(&safemsg, &scratch)) {
-       xfree(safe_checksum.contents);
+       krb5_xfree(safe_checksum.contents);
        return retval;
     }
-    xfree(safe_checksum.contents);
+    krb5_xfree(safe_checksum.contents);
     if (!(safe_flags & KRB5_SAFE_NOTIME)) {
        krb5_donot_replay replay;
 
@@ -154,13 +154,13 @@ OLDDECLARG(krb5_data *, outbuf)
        if (retval = krb5_rc_store(rcache, &replay)) {
            /* should we really error out here? XXX */
            clean_scratch();
-           xfree(replay.client);
+           krb5_xfree(replay.client);
            return retval;
        }
-       xfree(replay.client);
+       krb5_xfree(replay.client);
     }
     *outbuf = *scratch;
-    xfree(scratch);
+    krb5_xfree(scratch);
 
     return 0;
 }
index b59a8c364bb940fb7e4bb68cd107618d0865b440..8fb8bf15cab937b0caa15f18bd4bf79dc2cad5a1 100644 (file)
@@ -205,8 +205,8 @@ krb5_parse_name(name, nprincipal)
         */
        tmpdata = malloc(realmsize+1);
        if (tmpdata == 0) {
-               xfree(principal->data);
-               xfree(principal);
+               krb5_xfree(principal->data);
+               krb5_xfree(principal);
                return ENOMEM;
        }
        krb5_princ_set_realm_data(principal, tmpdata);
@@ -215,10 +215,10 @@ krb5_parse_name(name, nprincipal)
                  malloc(krb5_princ_component(principal, i)->length + 1);
                if (!tmpdata) {
                        for (i--; i >= 0; i--)
-                               xfree(krb5_princ_component(principal, i)->data);
-                       xfree(krb5_princ_realm(principal)->data);
-                       xfree(principal->data);
-                       xfree(principal);
+                               krb5_xfree(krb5_princ_component(principal, i)->data);
+                       krb5_xfree(krb5_princ_realm(principal)->data);
+                       krb5_xfree(principal->data);
+                       krb5_xfree(principal);
                        return(ENOMEM);
                }
                krb5_princ_component(principal, i)->data = tmpdata;
index a1c6c3c649f5c5333534e7991c4cf8cef166f787..1e51f937b1db8c22df1945d5e2242ff0f022889e 100644 (file)
@@ -94,7 +94,7 @@ OLDDECLARG(krb5_data *, outbuf)
        return retval;
     }
     
-#define cleanup_privmsg() {(void)xfree(privmsg->enc_part.ciphertext.data); (void)xfree(privmsg);}
+#define cleanup_privmsg() {(void)krb5_xfree(privmsg->enc_part.ciphertext.data); (void)krb5_xfree(privmsg);}
     if (!valid_etype(privmsg->enc_part.etype)) {
        cleanup_privmsg();
        return KRB5_PROG_ETYPE_NOSUPP;
@@ -110,7 +110,7 @@ OLDDECLARG(krb5_data *, outbuf)
         return ENOMEM;
     }
 
-#define cleanup_scratch() {(void)memset(scratch.data, 0, scratch.length); (void)xfree(scratch.data);}
+#define cleanup_scratch() {(void)memset(scratch.data, 0, scratch.length); (void)krb5_xfree(scratch.data);}
 
     /* do any necessary key pre-processing */
     if (retval = krb5_process_key(&eblock, key)) {
@@ -158,8 +158,8 @@ OLDDECLARG(krb5_data *, outbuf)
     }
     cleanup_scratch();
 
-#define cleanup_data() {(void)memset(privmsg_enc_part->user_data.data,0,privmsg_enc_part->user_data.length); (void)xfree(privmsg_enc_part->user_data.data);}
-#define cleanup_mesg() {(void)xfree(privmsg_enc_part);}
+#define cleanup_data() {(void)memset(privmsg_enc_part->user_data.data,0,privmsg_enc_part->user_data.length); (void)krb5_xfree(privmsg_enc_part->user_data.data);}
+#define cleanup_mesg() {(void)krb5_xfree(privmsg_enc_part);}
 
     if (!(priv_flags & KRB5_PRIV_NOTIME)) {
        krb5_donot_replay replay;
@@ -201,12 +201,12 @@ OLDDECLARG(krb5_data *, outbuf)
        replay.cusec = privmsg_enc_part->usec;
        replay.ctime = privmsg_enc_part->timestamp;
        if (retval = krb5_rc_store(rcache, &replay)) {
-           xfree(replay.client);
+           krb5_xfree(replay.client);
            cleanup_data();
            cleanup_mesg();  
            return retval;
        }
-       xfree(replay.client);
+       krb5_xfree(replay.client);
     }
 
     if (priv_flags & KRB5_PRIV_DOSEQUENCE)
index 8c327f74904af3fde69be937fbf8b7dd4db408f4..bf573ebd71ef0f4bb72dc5bb51a8c5c0367a2097 100644 (file)
@@ -182,8 +182,8 @@ krb5_tkt_authent **authdat;
        if (retval)
            goto cleanup;
        retval = krb5_rc_store(rcache, &rep);
-       xfree(rep.server);
-       xfree(rep.client);
+       krb5_xfree(rep.server);
+       krb5_xfree(rep.client);
        if (retval)
            goto cleanup;
     }
index 2cf92989ff7e7b284642cbec292b4bb50a288299..ad29c51f2f3fe83eed5cb4d59d7e5834ef2d1c93 100644 (file)
@@ -80,7 +80,7 @@ krb5_tkt_authent **authdat;
                                     sender_addr, 0,
                                     0, 0, rcache, authdat);
        krb5_rc_close(rcache);
-       xfree(rcache);
+       krb5_xfree(rcache);
     }
     krb5_free_ap_req(request);
 
index 7068aa4f8a4a1a486d195ae3ba05f017a04916c0..8e6cd992db2fd4f1a5780d41a5d3a71e188e8f46 100644 (file)
@@ -119,11 +119,11 @@ krb5_data *outbuf;
        replay.cusec = message->usec;
        replay.ctime = message->timestamp;
        if (retval = krb5_rc_store(rcache, &replay)) {
-           xfree(replay.client);
+           krb5_xfree(replay.client);
            cleanup();
            return retval;
        }
-       xfree(replay.client);
+       krb5_xfree(replay.client);
     }
 
     if (safe_flags & KRB5_SAFE_DOSEQUENCE)
@@ -173,7 +173,7 @@ krb5_data *outbuf;
     }
 
 #undef cleanup
-#define cleanup() {krb5_free_safe(message); xfree(our_cksum.contents);}
+#define cleanup() {krb5_free_safe(message); krb5_xfree(our_cksum.contents);}
 
     retval = krb5_calculate_checksum(his_cksum->checksum_type,
                                     scratch->data, scratch->length,
@@ -196,13 +196,13 @@ krb5_data *outbuf;
 
     *outbuf = message->user_data;
 
-    xfree(our_cksum.contents);
+    krb5_xfree(our_cksum.contents);
     if (message->s_address)
        krb5_free_address(message->s_address);
     if (message->r_address)
        krb5_free_address(message->r_address);
     krb5_free_checksum(his_cksum);
-    xfree(message);
+    krb5_xfree(message);
 
     return 0;
 }
index 1b514591584233aa6c367c1d6888724394e3110a..3e8775a846b4ec965a784518d374b8f3f58314d8 100644 (file)
@@ -92,21 +92,21 @@ krb5_recvauth(/* IN */
        if (retval = krb5_read_message(fd, &inbuf))
                return(retval);
        if (strcmp(inbuf.data, sendauth_version)) {
-               xfree(inbuf.data);
+               krb5_xfree(inbuf.data);
                problem = KRB5_SENDAUTH_BADAUTHVERS;
        }
-       xfree(inbuf.data);
+       krb5_xfree(inbuf.data);
        /*
         * Do the same thing for the application version string.
         */
        if (retval = krb5_read_message(fd, &inbuf))
                return(retval);
        if (strcmp(inbuf.data, appl_version)) {
-               xfree(inbuf.data);
+               krb5_xfree(inbuf.data);
                if (!problem)
                        problem = KRB5_SENDAUTH_BADAPPLVERS;
        }
-       xfree(inbuf.data);
+       krb5_xfree(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
@@ -199,7 +199,7 @@ krb5_recvauth(/* IN */
        if (!problem)
                problem = krb5_rd_req(&inbuf, server, sender_addr, fetch_from,
                                      keyproc, keyprocarg, rcache, &authdat);
-       xfree(inbuf.data);
+       krb5_xfree(inbuf.data);
 #ifdef WORKING_RCACHE
        if (rcache)
            retval = krb5_rc_close(rcache);
@@ -242,7 +242,7 @@ krb5_recvauth(/* IN */
        }
        if (retval = krb5_write_message(fd, &outbuf)) {
                if (outbuf.data)
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                if (!problem)
                        krb5_free_tkt_authent(authdat);
                return(retval);
@@ -287,11 +287,11 @@ krb5_recvauth(/* IN */
                        return(retval);
                }
                if (retval = krb5_write_message(fd, &outbuf)) {
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                        krb5_free_tkt_authent(authdat);
                        return(retval);
                }
-               xfree(outbuf.data);
+               krb5_xfree(outbuf.data);
        }
        /*
         * At this point, we've won.  We just need to copy whatever
@@ -321,7 +321,7 @@ krb5_recvauth(/* IN */
                *authent = authdat->authenticator;
        else
                krb5_free_authenticator(authdat->authenticator);
-       xfree(authdat);
+       krb5_xfree(authdat);
        return 0;
 }
 
index ef2a13d7a7f958bafae648cef8bf77997be82298..62093f33ff0271a6c0e885f009f272564bb2e6cf 100644 (file)
@@ -128,7 +128,7 @@ OLDDECLARG(krb5_response *,rep)
        if (!(scratch->data = realloc(scratch->data,
                                      tgsreq.authorization_data.ciphertext.length))) {
            /* may destroy scratch->data */
-           xfree(scratch);
+           krb5_xfree(scratch);
            return ENOMEM;
        }
        memset(scratch->data + scratch->length, 0,
@@ -147,20 +147,20 @@ OLDDECLARG(krb5_response *,rep)
                                  (krb5_pointer) tgsreq.authorization_data.ciphertext.data,
                                  scratch->length, &eblock, 0)) {
            (void) krb5_finish_key(&eblock);
-           xfree(tgsreq.authorization_data.ciphertext.data);
+           krb5_xfree(tgsreq.authorization_data.ciphertext.data);
            krb5_free_data(scratch);
            return retval;
        }           
        krb5_free_data(scratch);
        if (retval = krb5_finish_key(&eblock)) {
-           xfree(tgsreq.authorization_data.ciphertext.data);
+           krb5_xfree(tgsreq.authorization_data.ciphertext.data);
            return retval;
        }
     }
 #define cleanup_authdata() { if (tgsreq.authorization_data.ciphertext.data) {\
        (void) memset(tgsreq.authorization_data.ciphertext.data, 0,\
              tgsreq.authorization_data.ciphertext.length); \
-           xfree(tgsreq.authorization_data.ciphertext.data);}}
+           krb5_xfree(tgsreq.authorization_data.ciphertext.data);}}
 
 
 
@@ -203,7 +203,7 @@ OLDDECLARG(krb5_response *,rep)
                                         &ap_checksum)) {
        if (sec_ticket)
            krb5_free_ticket(sec_ticket);
-       xfree(ap_checksum.contents);
+       krb5_xfree(ap_checksum.contents);
        krb5_free_data(scratch);
        cleanup_authdata();
        return retval;
@@ -211,7 +211,7 @@ OLDDECLARG(krb5_response *,rep)
     /* done with body */
     krb5_free_data(scratch);
 
-#define cleanup() {xfree(ap_checksum.contents);\
+#define cleanup() {krb5_xfree(ap_checksum.contents);\
                   if (sec_ticket) krb5_free_ticket(sec_ticket);}
     /* attach ap_req to the tgsreq */
 
@@ -245,7 +245,7 @@ OLDDECLARG(krb5_response *,rep)
        if (!combined_padata) {
            cleanup();
            cleanup_authdata();
-           xfree(ap_req_padata.contents);
+           krb5_xfree(ap_req_padata.contents);
            return ENOMEM;
        }
        combined_padata[0] = &ap_req_padata;
@@ -257,7 +257,7 @@ OLDDECLARG(krb5_response *,rep)
        if (!combined_padata) {
            cleanup();
            cleanup_authdata();
-           xfree(ap_req_padata.contents);
+           krb5_xfree(ap_req_padata.contents);
            return ENOMEM;
        }
        combined_padata[0] = &ap_req_padata;
@@ -269,18 +269,18 @@ OLDDECLARG(krb5_response *,rep)
     if (retval = encode_krb5_tgs_req(&tgsreq, &scratch)) {
        cleanup();
        cleanup_authdata();
-       xfree(combined_padata);
-       xfree(ap_req_padata.contents);
+       krb5_xfree(combined_padata);
+       krb5_xfree(ap_req_padata.contents);
        return(retval);
     }
     if (sec_ticket)
        krb5_free_ticket(sec_ticket);
     cleanup_authdata();
-    xfree(combined_padata);
-    xfree(ap_req_padata.contents);
+    krb5_xfree(combined_padata);
+    krb5_xfree(ap_req_padata.contents);
 #undef cleanup_authdata
 #undef cleanup
-#define cleanup() {xfree(ap_checksum.contents);}
+#define cleanup() {krb5_xfree(ap_checksum.contents);}
 
     /* now send request & get response from KDC */
     retval = krb5_sendto_kdc(scratch, krb5_princ_realm(sname),
index f79e343222e064c9afe7df94505df8df6be26aa3..4270c368cd5f25ff7d538d9e3ca19999ffb1a7f0 100644 (file)
@@ -187,11 +187,11 @@ krb5_sendauth(/* IN */
        if (inbuf.length) {
                if (error) {
                        if (retval = krb5_rd_error(&inbuf, error)) {
-                               xfree(inbuf.data);
+                               krb5_xfree(inbuf.data);
                                return(retval);
                        }
                }
-               xfree(inbuf.data);
+               krb5_xfree(inbuf.data);
                krb5_free_cred_contents(&creds);
                memset((char *)&authent, 0, sizeof(authent));
                return(KRB5_SENDAUTH_REJECTED);
@@ -217,7 +217,7 @@ krb5_sendauth(/* IN */
                        problem = KRB5_SENDAUTH_MUTUAL_FAILED;
                memset((char *)&authent, 0, sizeof(authent));
                krb5_free_cred_contents(&creds);
-               xfree(inbuf.data);
+               krb5_xfree(inbuf.data);
                if (problem) {
                        krb5_free_ap_rep_enc_part(repl);
                        return(problem);
index f11f83d89e24b97551b3446a805f64dfe6fab3ed..96778755b8133f985cbe7bf114ea08d0c8b12ab1 100644 (file)
@@ -63,7 +63,7 @@ krb5_rcache *rcptr;
            } else
                retval = ENOMEM;
        }
-       xfree(rcache);
+       krb5_xfree(rcache);
     } else
        retval = ENOMEM;
     return retval;
index c3afad1de2d5662924ea2feccc532bdc0561fe1f..89bb72224930142beca4c656c116b25bf7f7f034 100644 (file)
@@ -140,7 +140,7 @@ char realm_branch_char;
     i = 1;
     if (retval = krb5_tgtname(client,
                              client, &rettree[0])) {
-       xfree(rettree);
+       krb5_xfree(rettree);
        return retval;
     }
     for (prevccp = ccp = client->data;
@@ -160,7 +160,7 @@ char realm_branch_char;
                krb5_free_principal(rettree[i-1]);
                i--;
            }
-           xfree(rettree);
+           krb5_xfree(rettree);
            return retval;
        }
        prevccp = ccp;
@@ -178,7 +178,7 @@ char realm_branch_char;
                krb5_free_principal(rettree[i-1]);
                i--;
            }
-           xfree(rettree);
+           krb5_xfree(rettree);
            return retval;
        }
        i++;
@@ -202,7 +202,7 @@ char realm_branch_char;
                krb5_free_principal(rettree[i-1]);
                i--;
            }
-           xfree(rettree);
+           krb5_xfree(rettree);
            return retval;
        }
        prevscp = scp + 1;
@@ -222,7 +222,7 @@ char realm_branch_char;
                krb5_free_principal(rettree[i-1]);
                i--;
            }
-           xfree(rettree);
+           krb5_xfree(rettree);
            return retval;
        }
     }
index 6efc506bdd1a16e5828686939946fa5f933b22f3..f36f167cd5f215d62336b5d981eb0f3bbf71493a 100644 (file)
@@ -102,13 +102,13 @@ char *lname;
 
     db = dbm_open(krb5_lname_file, O_RDONLY, 0600);
     if (!db) {
-       xfree(princ_name);
+       krb5_xfree(princ_name);
        return KRB5_LNAME_CANTOPEN;
     }
 
     contents = dbm_fetch(db, key);
 
-    xfree(princ_name);
+    krb5_xfree(princ_name);
 
     if (contents.dptr == NULL) {
        retval = KRB5_LNAME_NOTRANS;
index c68efce8eb4c7fa1ae7494b5fc66ef4a48c171b6..ff8fd8cfb5990e6f2d1ca8aa566e2304954f4b1b 100644 (file)
@@ -46,6 +46,6 @@ char * const *hostlist;
 
     for (cp = hostlist; *cp; cp++)
        free(*cp);
-    xfree(hostlist);
+    krb5_xfree(hostlist);
     return 0;
 }
index e41add029b3dd9cbb8929ee56241419fe576df22..ffd39e1743d332a1622bf248b0110697827880c3 100644 (file)
@@ -63,7 +63,7 @@ OLDDECLARG(krb5_address **,outaddr)
        2*sizeof(temptype) + 2*sizeof(templength);
 
     if (!(retaddr->contents = (krb5_octet *)malloc(retaddr->length))) {
-       xfree(retaddr);
+       krb5_xfree(retaddr);
        return ENOMEM;
     }
     marshal = retaddr->contents;
index 66ef9961e509b38af0ba2aaf6b972b7736961562..6bdd7661120ea882e1e50f31a807f8f3902d934e 100644 (file)
@@ -123,7 +123,7 @@ char ***hostlist;
            if (!rethlist[hlindex]) {
                for (--hlindex; hlindex >= 0; hlindex--)
                    free(rethlist[hlindex]);
-               xfree(rethlist);
+               krb5_xfree(rethlist);
                rethlist = 0;
                retval = ENOMEM;
                break;
@@ -147,7 +147,7 @@ char ***hostlist;
     (void) fclose(config_file);
 
     if (hlindex == 0) {
-       xfree(rethlist);
+       krb5_xfree(rethlist);
        rethlist = 0;
        retval = KRB5_REALM_UNKNOWN;
     }
index 644a4dd5d073e31e917cd54ee1825910b6bb5e90..bb506c7cc9e3fe6ec8aed75df030d5636d108f6d 100644 (file)
@@ -116,7 +116,7 @@ char ***realmsp;
        char *cp;
 
        if (!(retrealms[0] = malloc(strlen(&domain[1])+1))) {
-           xfree(retrealms);
+           krb5_xfree(retrealms);
            return ENOMEM;
        }
        strcpy(retrealms[0], &domain[1]);
@@ -126,14 +126,14 @@ char ***realmsp;
                *cp = toupper(*cp);
     } else {
        if (retval = krb5_get_default_realm(&retrealms[0])) {
-           xfree(retrealms);
+           krb5_xfree(retrealms);
            return retval;
        }
     }
 
     if ((trans_file = fopen(krb5_trans_file, "r")) == (FILE *) 0) {
-       xfree(retrealms[0]);
-       xfree(retrealms);
+       krb5_xfree(retrealms[0]);
+       krb5_xfree(retrealms);
        return KRB5_TRANS_CANTOPEN;
     }
     (void) sprintf(scanstring, "%%%ds %%%ds",
@@ -153,7 +153,7 @@ char ***realmsp;
            /* exact match of hostname, so return the realm */
            if (!(retrealms[0] = realloc(retrealms[0],
                                         strlen(trans_realm)+1))) {
-               xfree(retrealms);
+               krb5_xfree(retrealms);
                return ENOMEM;
            }
            (void) strcpy(retrealms[0], trans_realm);
@@ -166,7 +166,7 @@ char ***realmsp;
                /* domain match, save for later */
                if (!(retrealms[0] = realloc(retrealms[0],
                                             strlen(trans_realm)+1))) {
-                   xfree(retrealms);
+                   krb5_xfree(retrealms);
                    return ENOMEM;
                }
                (void) strcpy(retrealms[0], trans_realm);
index 55af537d72f7d7338c25a6244d49d3eec1701af3..d0531626a276e8e4ced2e443c8cb8843cbbf9008 100644 (file)
@@ -152,7 +152,7 @@ krb5_error_code krb5_os_localaddr(addr)
                    address->length = sizeof(struct in_addr);
                    address->contents = (unsigned char *)malloc(address->length);
                    if (!address->contents) {
-                       xfree(address);
+                       krb5_xfree(address);
                        address = 0;
                        mem_err++;
                    } else {
@@ -179,7 +179,7 @@ krb5_error_code krb5_os_localaddr(addr)
                    address->length = sizeof(struct ns_addr);
                    address->contents = (unsigned char *)malloc(address->length);
                    if (!address->contents) {
-                       xfree(address);
+                       krb5_xfree(address);
                        address = 0;
                        mem_err++;
                    } else {
@@ -210,7 +210,7 @@ krb5_error_code krb5_os_localaddr(addr)
     
     if (mem_err) {
        for (i=0; i<n_found; i++) {
-           xfree(addr_temp[i]);
+           krb5_xfree(addr_temp[i]);
            addr_temp[i] = 0;
        }
        return ENOMEM;
index 9b1da0ffea16235ac043277c374e475aaa6aaf19..d9df8bc900c59f827283f5268e81d1a5ebf73b73 100644 (file)
@@ -60,7 +60,7 @@ krb5_read_message(fdp, inbuf)
                        return(ENOMEM);
                }
                if ((len2 = krb5_net_read(fd, buf, len)) != len) {
-                       xfree(buf);
+                       krb5_xfree(buf);
                        return((len2 < 0) ? errno : ECONNABORTED);
                }
        }
index 7977321a313ed1a52ef0dc09c450e34be6385268..bfa7ed5602734e3cd414f5ec49ceb91b93c30161 100644 (file)
@@ -158,7 +158,7 @@ int *size_return;
        /* interrupted */
        if (readin_string) {
            (void) memset((char *)readin_string, 0, *size_return);
-           xfree(readin_string);
+           krb5_xfree(readin_string);
        }
        (void) memset(return_pwd, 0, *size_return);
        cleanup(KRB5_LIBOS_PWDINTR);
@@ -203,7 +203,7 @@ int *size_return;
            (void) putchar('\n');
            (void) memset((char *)readin_string, 0, *size_return);
            (void) memset(return_pwd, 0, *size_return);
-           xfree(readin_string);
+           krb5_xfree(readin_string);
            cleanup(KRB5_LIBOS_CANTREADPWD);
        }
        (void) putchar('\n');
@@ -219,11 +219,11 @@ int *size_return;
        if (strncmp(return_pwd, (char *)readin_string, *size_return)) {
            (void) memset((char *)readin_string, 0, *size_return);
            (void) memset(return_pwd, 0, *size_return);
-           xfree(readin_string);
+           krb5_xfree(readin_string);
            cleanup(KRB5_LIBOS_BADPWDMATCH);
        }
        (void) memset((char *)readin_string, 0, *size_return);
-       xfree(readin_string);
+       krb5_xfree(readin_string);
     }
     
     /* reset intrfunc */
index 64a94f5cb4770d1f0c98ef5c78478475d3f2e941..f8dc24cab7931e1fdf56ccb1adb4d4741d236f0e 100644 (file)
@@ -94,7 +94,7 @@ OLDDECLARG(krb5_data *, reply)
        socklist[i] = -1;
 
     if (!(reply->data = malloc(krb5_max_dgram_size))) {
-       xfree(addr);
+       krb5_xfree(addr);
        return ENOMEM;
     }
     reply->length = krb5_max_dgram_size;
@@ -195,7 +195,7 @@ OLDDECLARG(krb5_data *, reply)
     for (i = 0; i < AF_MAX; i++)
        if (socklist[i] != -1)
            (void) close(socklist[i]);
-    xfree(addr);
+    krb5_xfree(addr);
     if (retval) {
        free(reply->data);
        reply->data = 0;
index 4e19cb2409b37787dd1938f7d6ac58dbbfc07524..9edede3b91278d22e4edff024143a03d231af6b9 100644 (file)
@@ -94,7 +94,7 @@ OLDDECLARG(krb5_principal *,ret_princ)
        }
        if (!hrealms[0]) {
            free(remote_host);
-           xfree(hrealms);
+           krb5_xfree(hrealms);
            return KRB5_ERR_HOST_REALM_UNKNOWN;
        }
 
index c53f9deabdca57b296efd9b4f73fb0c3cd889847..91a7b65aacea142357a64b211d5709d14a0d3700 100644 (file)
@@ -511,11 +511,11 @@ xmit_database(fd, database_fd, database_size)
                exit(1);
        }
        if (retval = krb5_write_message((void *) &fd, &outbuf)) {
-               xfree(outbuf.data);
+               krb5_xfree(outbuf.data);
                com_err(progname, retval, "while sending database size");
                exit(1);
        }
-       xfree(outbuf.data);
+       krb5_xfree(outbuf.data);
        /*
         * Initialize the initial vector.
         */
@@ -552,13 +552,13 @@ xmit_database(fd, database_fd, database_size)
                        exit(1);
                }
                if (retval = krb5_write_message((void *) &fd, &outbuf)) {
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                        com_err(progname, retval,
                                "while sending database block starting at %d",
                                sent_size);
                        exit(1);
                }
-               xfree(outbuf.data);
+               krb5_xfree(outbuf.data);
                sent_size += n;
                if (debug)
                        printf("%d bytes sent.\n", sent_size);
@@ -650,7 +650,7 @@ send_error(fd, err_text, err_code)
                strcpy(error.text.data, text);
                if (!krb5_mk_error(&error, &outbuf)) {
                        (void) krb5_write_message((void *) &fd, &outbuf);
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                }
                free(error.text.data);
        }
index 0077aa54fb62d0178b2b8e7ab56c42704443573f..2903290a262d503d96819de2aa07085f948e5287 100644 (file)
@@ -616,14 +616,14 @@ recv_database(fd, database_fd)
                                  KRB5_SAFE_DOSEQUENCE|KRB5_SAFE_NOTIME,
                                  0, &outbuf)) {
                send_error(fd, retval, "while decoding database size");
-               xfree(inbuf.data);
+               krb5_xfree(inbuf.data);
                com_err(progname, retval,
                        "while decoding database size from client");
                exit(1);
        }
        memcpy((char *) &database_size, outbuf.data, sizeof(database_size));
-       xfree(inbuf.data);
-       xfree(outbuf.data);
+       krb5_xfree(inbuf.data);
+       krb5_xfree(outbuf.data);
        database_size = ntohl(database_size);
        /*
         * Initialize the initial vector.
@@ -662,12 +662,12 @@ recv_database(fd, database_fd)
                                received_size);
                        com_err(progname, retval, buf);
                        send_error(fd, retval, buf);
-                       xfree(inbuf.data);
+                       krb5_xfree(inbuf.data);
                        exit(1);
                }
                n = write(database_fd, outbuf.data, outbuf.length);
-               xfree(inbuf.data);
-               xfree(outbuf.data);
+               krb5_xfree(inbuf.data);
+               krb5_xfree(outbuf.data);
                if (n < 0) {
                        sprintf(buf,
                                "while writing database block starting at offset %d",
@@ -712,12 +712,12 @@ recv_database(fd, database_fd)
                exit(1);
        }
        if (retval = krb5_write_message((void *) &fd, &outbuf)) {
-               xfree(outbuf.data);
+               krb5_xfree(outbuf.data);
                com_err(progname, retval,
                        "while sending # of receeived bytes");
                exit(1);
        }
-       xfree(outbuf.data);
+       krb5_xfree(outbuf.data);
 }
 
 
@@ -756,7 +756,7 @@ send_error(fd, err_code, err_text)
                strcpy(error.text.data, text);
                if (!krb5_mk_error(&error, &outbuf)) {
                        (void) krb5_write_message((void *) &fd, &outbuf);
-                       xfree(outbuf.data);
+                       krb5_xfree(outbuf.data);
                }
                free(error.text.data);
        }
index e07e9f0f527d8ba1f20bc31d775d8e888affac9a..a9c35461183c3ca44047b0adfae3ccabc1212a24 100644 (file)
@@ -298,7 +298,7 @@ out:
   return(code);
 
   errout:
-  if (*key) xfree(*key);
+  if (*key) krb5_xfree(*key);
   goto out;
 
 }
@@ -355,7 +355,7 @@ int verify_cs_pair(p_client_str, p_client, p_server_str, p_num,
 
     krb5_free_tkt_authent(authdat);
     krb5_free_principal(server);
-    if (request_data.data) xfree(request_data.data);
+    if (request_data.data) krb5_xfree(request_data.data);
 
     return(0);
 }