diff options
author | Ken Raeburn <raeburn@mit.edu> | 2009-01-28 00:04:15 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2009-01-28 00:04:15 +0000 |
commit | a512f5779d0e84c3a418055d8fe653f30bcf5601 (patch) | |
tree | 420f0e5ff6871e1acf27bc252f37cfa9867b8d47 /src/lib/kdb/encrypt_key.c | |
parent | fb96845a0ef8a47e6f35d7cd6aaadf20473dc3f5 (diff) | |
download | krb5-a512f5779d0e84c3a418055d8fe653f30bcf5601.tar.gz krb5-a512f5779d0e84c3a418055d8fe653f30bcf5601.tar.xz krb5-a512f5779d0e84c3a418055d8fe653f30bcf5601.zip |
Start to phase out krb5_xfree macro, which just casts its argument to
char* and calls free.
Replace most uses, outside of the LDAP KDB plugin, which doesn't build
on my test system of the moment because of version dependencies. Add
one explicit cast to make the change warning-neutral (under gcc 4.0.1
on Mac OS X 10.5.6).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21812 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/kdb/encrypt_key.c')
-rw-r--r-- | src/lib/kdb/encrypt_key.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/kdb/encrypt_key.c b/src/lib/kdb/encrypt_key.c index bf778ea858..0db1a029a4 100644 --- a/src/lib/kdb/encrypt_key.c +++ b/src/lib/kdb/encrypt_key.c @@ -79,7 +79,7 @@ krb5_dbekd_def_encrypt_key_data( krb5_context context, for (i = 0; i < key_data->key_data_ver; i++) if (key_data->key_data_contents[i]) - krb5_xfree(key_data->key_data_contents[i]); + free(key_data->key_data_contents[i]); key_data->key_data_ver = 1; key_data->key_data_kvno = keyver; @@ -110,7 +110,7 @@ krb5_dbekd_def_encrypt_key_data( krb5_context context, if ((retval = krb5_c_encrypt(context, mkey, /* XXX */ 0, 0, &plain, &cipher))) { - krb5_xfree(key_data->key_data_contents[0]); + free(key_data->key_data_contents[0]); return retval; } @@ -123,7 +123,7 @@ krb5_dbekd_def_encrypt_key_data( krb5_context context, key_data->key_data_contents[1] = (krb5_octet *)malloc(keysalt->data.length); if (key_data->key_data_contents[1] == NULL) { - krb5_xfree(key_data->key_data_contents[0]); + free(key_data->key_data_contents[0]); return ENOMEM; } memcpy(key_data->key_data_contents[1], keysalt->data.data, |