summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1991-02-19 10:10:26 +0000
committerJohn Kohl <jtkohl@mit.edu>1991-02-19 10:10:26 +0000
commitcce31e4f909c503eac8e78f2e39779bb3593e979 (patch)
treed4fb0c8c0ab7cd38cb79de09ec58fb4c02e9204c /src/lib
parent1494cdd8d3203fccf693826e03575018ff068997 (diff)
downloadkrb5-cce31e4f909c503eac8e78f2e39779bb3593e979.tar.gz
krb5-cce31e4f909c503eac8e78f2e39779bb3593e979.tar.xz
krb5-cce31e4f909c503eac8e78f2e39779bb3593e979.zip
update copyright notices
use xfree rather than free((char *)) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1725 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/crypto/des/fin_rndkey.c6
-rw-r--r--src/lib/crypto/des/random_key.c7
-rw-r--r--src/lib/crypto/des/string2key.c7
-rw-r--r--src/lib/kdb/decrypt_key.c8
-rw-r--r--src/lib/kdb/encrypt_key.c10
-rw-r--r--src/lib/kdb/kdb_dbm.c12
-rw-r--r--src/lib/krb5/asn.1/encode.c6
-rw-r--r--src/lib/krb5/ccache/file/fcc_sseq.c5
-rw-r--r--src/lib/krb5/krb/copy_data.c6
9 files changed, 32 insertions, 35 deletions
diff --git a/src/lib/crypto/des/fin_rndkey.c b/src/lib/crypto/des/fin_rndkey.c
index 21b3bea8f..089cd9c44 100644
--- a/src/lib/crypto/des/fin_rndkey.c
+++ b/src/lib/crypto/des/fin_rndkey.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>.
@@ -14,7 +15,6 @@ static char rcsid_fin_rndkey_c[] =
"$Id$";
#endif /* !lint & !SABER */
-#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/mit-des.h>
#include <krb5/ext-proto.h>
@@ -27,7 +27,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) );
- free((char *)*seed);
+ xfree(*seed);
*seed = 0;
return 0; /* XXX init_random_key */
}
diff --git a/src/lib/crypto/des/random_key.c b/src/lib/crypto/des/random_key.c
index bc0b06e9a..ee46b7d97 100644
--- a/src/lib/crypto/des/random_key.c
+++ b/src/lib/crypto/des/random_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>.
@@ -14,8 +15,6 @@ static char rcsid_random_key_c[] =
"$Id$";
#endif /* !lint & !SABER */
-#include <krb5/copyright.h>
-
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
@@ -35,7 +34,7 @@ OLDDECLARG(krb5_keyblock **, keyblock)
if (!(randkey = (krb5_keyblock *)malloc(sizeof(*randkey))))
return ENOMEM;
if (!(randkey->contents = (krb5_octet *)malloc(sizeof(mit_des_cblock)))) {
- free((char *)randkey);
+ xfree(randkey);
return ENOMEM;
}
randkey->length = sizeof(mit_des_cblock);
diff --git a/src/lib/crypto/des/string2key.c b/src/lib/crypto/des/string2key.c
index d21443ab4..7453ddeac 100644
--- a/src/lib/crypto/des/string2key.c
+++ b/src/lib/crypto/des/string2key.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_string2key_c[] =
"$Id$";
#endif /* !lint & !SABER */
-#include <krb5/copyright.h>
-
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
@@ -75,7 +74,7 @@ OLDDECLARG(const krb5_data *, salt)
return(ENOMEM);
#define cleanup() {memset(keyblock->contents, 0, sizeof(mit_des_cblock));\
- (void) free((char *) keyblock->contents);}
+ xfree(keyblock->contents);}
keyblock->keytype = KEYTYPE_DES;
keyblock->length = sizeof(mit_des_cblock);
diff --git a/src/lib/kdb/decrypt_key.c b/src/lib/kdb/decrypt_key.c
index e942941f1..fb35dd1d0 100644
--- a/src/lib/kdb/decrypt_key.c
+++ b/src/lib/kdb/decrypt_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_decrypt_key_c [] =
"$Id$";
#endif /* !lint & !SABER */
-#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
#include <krb5/kdb.h>
@@ -57,13 +57,13 @@ krb5_keyblock *out;
sizeof(in->length)),
(krb5_pointer) out->contents,
in->length-sizeof(in->length), eblock, 0)) {
- free((char *)out->contents);
+ xfree(out->contents);
out->contents = 0;
out->length = 0;
return retval;
}
if (out->length < 0) {
- free((char *)out->contents);
+ xfree(out->contents);
out->contents = 0;
out->length = 0;
return KRB5_KDB_INVALIDKEYSIZE;
diff --git a/src/lib/kdb/encrypt_key.c b/src/lib/kdb/encrypt_key.c
index 22000ec31..6d9724f23 100644
--- a/src/lib/kdb/encrypt_key.c
+++ b/src/lib/kdb/encrypt_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_encrypt_key_c [] =
"$Id$";
#endif /* !lint & !SABER */
-#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
#include <krb5/kdb.h>
@@ -54,7 +54,7 @@ krb5_encrypted_keyblock *out;
out->length += sizeof(out->length);
out->contents = (krb5_octet *)malloc(out->length);
if (!out->contents) {
- free((char *)tmpin.contents);
+ xfree(tmpin.contents);
out->contents = 0;
out->length = 0;
return ENOMEM;
@@ -67,9 +67,9 @@ krb5_encrypted_keyblock *out;
(krb5_pointer) (((char *) out->contents) +
sizeof(out->length)),
tmpin.length, eblock, 0);
- free((char *)tmpin.contents);
+ xfree(tmpin.contents);
if (retval) {
- free((char *)out->contents);
+ xfree(out->contents);
out->contents = 0;
out->length = 0;
}
diff --git a/src/lib/kdb/kdb_dbm.c b/src/lib/kdb/kdb_dbm.c
index 95a92d90d..f29dac649 100644
--- a/src/lib/kdb/kdb_dbm.c
+++ b/src/lib/kdb/kdb_dbm.c
@@ -2,7 +2,8 @@
* $Source$
* $Author$
*
- * Copyright 1988,1989,1990 by the Massachusetts Institute of Technology.
+ * Copyright 1988,1989,1990,1991 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
*
* For copying and distribution information, please see the file
* <krb5/copyright.h>.
@@ -13,7 +14,6 @@ static char rcsid_krb_dbm_c[] =
"$Id$";
#endif /* lint */
-#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/dbm.h>
#include <krb5/kdb.h>
@@ -522,7 +522,7 @@ krb5_db_entry *entry;
if (keysize != entry->key.length) {
krb5_free_principal(princ);
krb5_free_principal(mod_princ);
- free((char *)entry->key.contents);
+ xfree(entry->key.contents);
(void) memset((char *) entry, 0, sizeof(*entry));
return KRB5_KDB_TRUNCATED_RECORD;
}
@@ -534,7 +534,7 @@ krb5_db_entry *entry;
if (!(entry->salt = (krb5_octet *)malloc(entry->salt_length))) {
krb5_free_principal(princ);
krb5_free_principal(mod_princ);
- free((char *)entry->key.contents);
+ xfree(entry->key.contents);
(void) memset((char *) entry, 0, sizeof(*entry));
return KRB5_KDB_TRUNCATED_RECORD;
}
@@ -549,9 +549,9 @@ krb5_db_entry *entry;
{
/* erase the key */
memset((char *)entry->key.contents, 0, entry->key.length);
- free((char *)entry->key.contents);
+ xfree(entry->key.contents);
if (entry->salt_length)
- free((char *)entry->salt);
+ xfree(entry->salt);
krb5_free_principal(entry->principal);
krb5_free_principal(entry->mod_name);
diff --git a/src/lib/krb5/asn.1/encode.c b/src/lib/krb5/asn.1/encode.c
index a51d596de..63bad48cc 100644
--- a/src/lib/krb5/asn.1/encode.c
+++ b/src/lib/krb5/asn.1/encode.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_encode_c[] =
"$Id$";
#endif /* lint || saber */
-#include <krb5/copyright.h>
#include <isode/psap.h>
#include <krb5/krb5.h>
#include <krb5/asn1.h>
@@ -70,7 +70,7 @@ void (*free_translation) PROTOTYPE((krb5_pointer ));
alldatout:
free((*data_out)->data);
datout:
- free((char *)*data_out);
+ xfree(*data_out);
*data_out = 0;
peout:
pe_free(pe);
diff --git a/src/lib/krb5/ccache/file/fcc_sseq.c b/src/lib/krb5/ccache/file/fcc_sseq.c
index 589e62668..aee5ffceb 100644
--- a/src/lib/krb5/ccache/file/fcc_sseq.c
+++ b/src/lib/krb5/ccache/file/fcc_sseq.c
@@ -3,6 +3,7 @@
* $Author$
*
* Copyright 1990,1991 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
*
* For copying and distribution information, please see the file
* <krb5/copyright.h>.
@@ -14,8 +15,6 @@
static char rcsid_fcc_sseq_c[] = "$Id$";
#endif /* !lint && !SABER */
-#include <krb5/copyright.h>
-
#include "fcc.h"
/*
@@ -45,7 +44,7 @@ krb5_fcc_start_seq_get(id, cursor)
if (OPENCLOSE(id)) {
ret = krb5_fcc_open_file(id, FCC_OPEN_RDONLY);
if (ret) {
- free((char *)fcursor);
+ xfree(fcursor);
return ret;
}
}
diff --git a/src/lib/krb5/krb/copy_data.c b/src/lib/krb5/krb/copy_data.c
index 3e17ce563..0e21c2c6c 100644
--- a/src/lib/krb5/krb/copy_data.c
+++ b/src/lib/krb5/krb/copy_data.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_copy_data_c[] =
"$Id$";
#endif /* !lint & !SABER */
-#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
@@ -34,7 +34,7 @@ krb5_data **outdata;
*tempdata = *indata;
if (!(tempdata->data = malloc(tempdata->length))) {
- free((char *)tempdata);
+ xfree(tempdata);
return ENOMEM;
}
memcpy((char *)tempdata->data, (char *)indata->data, tempdata->length);