[27311] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Add camellia_key_cleanup

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Wed Nov 28 16:30:54 2012

Date: Wed, 28 Nov 2012 15:36:21 -0500
From: Benjamin Kaduk <kaduk@mit.edu>
Message-Id: <201211282036.qASKaLLq007008@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/6b37134d163beeeb136b4a59109c523e0bf83f3b
commit 6b37134d163beeeb136b4a59109c523e0bf83f3b
Author: Ben Kaduk <kaduk@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
 };
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post