diff options
-rw-r--r-- | src/lib/krb425/mk_req.c | 8 | ||||
-rw-r--r-- | src/lib/krb425/set_key.c | 6 | ||||
-rw-r--r-- | src/lib/krb5/krb/in_tkt_pwd.c | 6 | ||||
-rw-r--r-- | src/lib/krb5/krb/mk_error.c | 7 | ||||
-rw-r--r-- | src/lib/krb5/krb/mk_priv.c | 6 | ||||
-rw-r--r-- | src/lib/krb5/krb/mk_safe.c | 7 | ||||
-rw-r--r-- | src/lib/krb5/os/free_krbhs.c | 7 | ||||
-rw-r--r-- | src/lib/krb5/os/get_krbhst.c | 9 | ||||
-rw-r--r-- | src/lib/krb5/os/localaddr.c | 10 | ||||
-rw-r--r-- | src/lib/krb5/os/read_pwd.c | 13 | ||||
-rw-r--r-- | src/lib/krb5/os/sendto_kdc.c | 9 |
11 files changed, 41 insertions, 47 deletions
diff --git a/src/lib/krb425/mk_req.c b/src/lib/krb425/mk_req.c index 30ec9daf23..188f6b641a 100644 --- a/src/lib/krb425/mk_req.c +++ b/src/lib/krb425/mk_req.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -15,7 +16,6 @@ static char rcsid_mk_req_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> #include "krb425.h" int @@ -68,12 +68,12 @@ u_long checksum; EPRINT "Return to long (%d > %d)\n", outbuf.length, MAX_KTXT_LEN); #endif - free((char *)outbuf.data); + xfree(outbuf.data); return(KFAILURE); } authent->length = outbuf.length; memcpy((char *)authent->dat, (char *)outbuf.data, outbuf.length); - free((char *)outbuf.data); + xfree(outbuf.data); } return(krb425error(r)); } diff --git a/src/lib/krb425/set_key.c b/src/lib/krb425/set_key.c index a25d1a0353..4e8964cc42 100644 --- a/src/lib/krb425/set_key.c +++ b/src/lib/krb425/set_key.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -15,7 +16,6 @@ static char rcsid_set_key_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> #include "krb425.h" int @@ -27,7 +27,7 @@ int cvt; if (cvt) { if (keyblock.contents) - free((char *)keyblock.contents); + xfree(keyblock.contents); mit_des_string_to_key(KEYTYPE_DES, &keyblock, 0, 0); } else { if (!keyblock.contents && diff --git a/src/lib/krb5/krb/in_tkt_pwd.c b/src/lib/krb5/krb/in_tkt_pwd.c index 78b9ed6dc5..412be24893 100644 --- a/src/lib/krb5/krb/in_tkt_pwd.c +++ b/src/lib/krb5/krb/in_tkt_pwd.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -15,7 +16,6 @@ static char rcsid_in_tkt_pwd_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> #include <krb5/krb5.h> #include <krb5/ext-proto.h> #include <krb5/libos-proto.h> @@ -97,7 +97,7 @@ OLDDECLARG(krb5_pa_data **,padata) *key, &arg->password, &salt)) { - free((char *) *key); + xfree(*key); if (f_salt) xfree(salt.data); return(retval); } diff --git a/src/lib/krb5/krb/mk_error.c b/src/lib/krb5/krb/mk_error.c index 8fae668c11..f33b402711 100644 --- a/src/lib/krb5/krb/mk_error.c +++ b/src/lib/krb5/krb/mk_error.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -15,8 +16,6 @@ static char rcsid_mk_error_c [] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> - #include <krb5/krb5.h> #include <krb5/asn1.h> @@ -41,6 +40,6 @@ krb5_data *enc_err; if (retval = encode_krb5_error(dec_err, &new_enc_err)) return(retval); *enc_err = *new_enc_err; - (void)free((char *)new_enc_err); + xfree(new_enc_err); return 0; } diff --git a/src/lib/krb5/krb/mk_priv.c b/src/lib/krb5/krb/mk_priv.c index 483b1007b5..d4c1e0b333 100644 --- a/src/lib/krb5/krb/mk_priv.c +++ b/src/lib/krb5/krb/mk_priv.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -15,7 +16,6 @@ static char rcsid_mk_priv_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> #include <krb5/krb5.h> #include <krb5/asn1.h> #include <krb5/libos-proto.h> @@ -158,7 +158,7 @@ privmsg.enc_part.ciphertext.length = 0; privmsg.enc_part.ciphertext.data = 0;} cleanup_encpart(); *outbuf = *scratch; - free((char *)scratch); + xfree(scratch); return 0; clean_prockey: diff --git a/src/lib/krb5/krb/mk_safe.c b/src/lib/krb5/krb/mk_safe.c index 12fb9638ef..5fe61d6106 100644 --- a/src/lib/krb5/krb/mk_safe.c +++ b/src/lib/krb5/krb/mk_safe.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -15,9 +16,7 @@ static char rcsid_mk_safe_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> #include <krb5/krb5.h> - #include <krb5/asn1.h> #include <krb5/libos-proto.h> #include <krb5/ext-proto.h> @@ -122,7 +121,7 @@ OLDDECLARG(krb5_data *, outbuf) } xfree(safe_checksum.contents); *outbuf = *scratch; - free((char *)scratch); + xfree(scratch); return 0; } diff --git a/src/lib/krb5/os/free_krbhs.c b/src/lib/krb5/os/free_krbhs.c index 04317babc6..1e998cf61c 100644 --- a/src/lib/krb5/os/free_krbhs.c +++ b/src/lib/krb5/os/free_krbhs.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -15,8 +16,6 @@ static char rcsid_free_krbhs_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> - #include <krb5/krb5.h> #include <krb5/ext-proto.h> @@ -33,6 +32,6 @@ char * const *hostlist; for (cp = hostlist; *cp; cp++) free(*cp); - free((char *)hostlist); + xfree(hostlist); return 0; } diff --git a/src/lib/krb5/os/get_krbhst.c b/src/lib/krb5/os/get_krbhst.c index 6845e9136b..6660708ca3 100644 --- a/src/lib/krb5/os/get_krbhst.c +++ b/src/lib/krb5/os/get_krbhst.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -15,8 +16,6 @@ static char rcsid_get_krbhst_c [] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> - #include <krb5/krb5.h> #include <krb5/ext-proto.h> #include <stdio.h> @@ -99,7 +98,7 @@ char ***hostlist; if (!rethlist[hlindex]) { for (--hlindex; hlindex >= 0; hlindex--) free(rethlist[hlindex]); - free((char *) rethlist); + xfree(rethlist); rethlist = 0; retval = ENOMEM; break; @@ -129,7 +128,7 @@ char ***hostlist; (void) fclose(config_file); if (hlindex == 0) { - free((char *)rethlist); + xfree(rethlist); rethlist = 0; retval = KRB5_REALM_UNKNOWN; } diff --git a/src/lib/krb5/os/localaddr.c b/src/lib/krb5/os/localaddr.c index d5fe6ee6c6..335788a328 100644 --- a/src/lib/krb5/os/localaddr.c +++ b/src/lib/krb5/os/localaddr.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -17,7 +18,6 @@ static char rcsid_getaddr_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> #include <krb5/krb5.h> #include <krb5/osconf.h> @@ -138,7 +138,7 @@ krb5_error_code krb5_os_localaddr(addr) address->length = sizeof(struct in_addr); address->contents = (unsigned char *)malloc(address->length); if (!address->contents) { - free((char *)address); + xfree(address); address = 0; mem_err++; } else { @@ -165,7 +165,7 @@ krb5_error_code krb5_os_localaddr(addr) address->length = sizeof(struct ns_addr); address->contents = (unsigned char *)malloc(address->length); if (!address->contents) { - free((char *)address); + xfree(address); address = 0; mem_err++; } else { @@ -196,7 +196,7 @@ krb5_error_code krb5_os_localaddr(addr) if (mem_err) { for (i=0; i<n_found; i++) { - free((char *)addr_temp[i]); + xfree(addr_temp[i]); addr_temp[i] = 0; } return ENOMEM; diff --git a/src/lib/krb5/os/read_pwd.c b/src/lib/krb5/os/read_pwd.c index 367d5ecee1..6140f593a9 100644 --- a/src/lib/krb5/os/read_pwd.c +++ b/src/lib/krb5/os/read_pwd.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -15,8 +16,6 @@ static char rcsid_read_pwd_c[] = "$Id$"; #endif /* lint */ -#include <krb5/copyright.h> - #include <krb5/krb5.h> #include <stdio.h> @@ -99,7 +98,7 @@ int *size_return; /* interrupted */ if (readin_string) { (void) memset((char *)readin_string, 0, *size_return); - free((char *)readin_string); + xfree(readin_string); } (void) memset(return_pwd, 0, *size_return); cleanup(KRB5_LIBOS_PWDINTR); @@ -144,7 +143,7 @@ int *size_return; (void) putchar('\n'); (void) memset((char *)readin_string, 0, *size_return); (void) memset(return_pwd, 0, *size_return); - free((char *)readin_string); + xfree(readin_string); cleanup(KRB5_LIBOS_CANTREADPWD); } (void) putchar('\n'); @@ -160,11 +159,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); - free((char *)readin_string); + xfree(readin_string); cleanup(KRB5_LIBOS_BADPWDMATCH); } (void) memset((char *)readin_string, 0, *size_return); - free((char *)readin_string); + xfree(readin_string); } /* reset intrfunc */ diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index bdb756407d..b7e19d19dd 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -16,8 +17,6 @@ static char rcsid_sendto_kdc_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> - #include <krb5/krb5.h> #include <krb5/ext-proto.h> @@ -78,7 +77,7 @@ OLDDECLARG(krb5_data *, reply) socklist[i] = -1; if (!(reply->data = malloc(krb5_max_dgram_size))) { - free((char *)addr); + xfree(addr); return ENOMEM; } reply->length = krb5_max_dgram_size; @@ -170,7 +169,7 @@ OLDDECLARG(krb5_data *, reply) for (i = 0; i < AF_MAX; i++) if (socklist[i] != -1) (void) close(socklist[i]); - free((char *)addr); + xfree(addr); if (retval) { free(reply->data); reply->data = 0; |