krb5 commit: Add camellia_key_cleanup
Benjamin Kaduk
kaduk at MIT.EDU
Wed Nov 28 15:36:21 EST 2012
https://github.com/krb5/krb5/commit/6b37134d163beeeb136b4a59109c523e0bf83f3b
commit 6b37134d163beeeb136b4a59109c523e0bf83f3b
Author: Ben Kaduk <kaduk at mit.edu>
Date: Wed Nov 21 21:57:40 2012 -0500
Add camellia_key_cleanup
Fix memory leak.
ticket: 7457
tags: pullup
target_version: 1.11
src/lib/crypto/builtin/enc_provider/camellia.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/lib/crypto/builtin/enc_provider/camellia.c b/src/lib/crypto/builtin/enc_provider/camellia.c
index 2faf811..7a0fbd9 100644
--- a/src/lib/crypto/builtin/enc_provider/camellia.c
+++ b/src/lib/crypto/builtin/enc_provider/camellia.c
@@ -318,6 +318,12 @@ camellia_init_state(const krb5_keyblock *key, krb5_keyusage usage,
return 0;
}
+static void
+camellia_key_cleanup(krb5_key key)
+{
+ zapfree(key->cache, sizeof(struct camellia_key_info_cache));
+}
+
const struct krb5_enc_provider krb5int_enc_camellia128 = {
16,
16, 16,
@@ -326,6 +332,7 @@ const struct krb5_enc_provider krb5int_enc_camellia128 = {
krb5int_camellia_cbc_mac,
camellia_init_state,
krb5int_default_free_state,
+ camellia_key_cleanup
};
const struct krb5_enc_provider krb5int_enc_camellia256 = {
@@ -335,5 +342,6 @@ const struct krb5_enc_provider krb5int_enc_camellia256 = {
krb5int_camellia_decrypt,
krb5int_camellia_cbc_mac,
camellia_init_state,
- krb5int_default_free_state
+ krb5int_default_free_state,
+ camellia_key_cleanup
};
More information about the cvs-krb5
mailing list