diff options
author | Greg Hudson <ghudson@mit.edu> | 2009-10-20 02:07:22 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2009-10-20 02:07:22 +0000 |
commit | 4f7a121a63ae3a9496db2b8be4cb4d5f357f38d2 (patch) | |
tree | e4c23dcbeb11f49da87a2bcfaf4378cba0c80a55 /src/lib/crypto | |
parent | bd19b798ba1583651b729910fbb5508e6cb2b4e7 (diff) | |
download | krb5-4f7a121a63ae3a9496db2b8be4cb4d5f357f38d2.zip krb5-4f7a121a63ae3a9496db2b8be4cb4d5f357f38d2.tar.gz krb5-4f7a121a63ae3a9496db2b8be4cb4d5f357f38d2.tar.bz2 |
Fix memory leaks in enc-perf work
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22949 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto')
-rw-r--r-- | src/lib/crypto/builtin/arcfour/arcfour.c | 1 | ||||
-rw-r--r-- | src/lib/crypto/krb/key.c | 2 | ||||
-rw-r--r-- | src/lib/crypto/openssl/arcfour/arcfour.c | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/crypto/builtin/arcfour/arcfour.c b/src/lib/crypto/builtin/arcfour/arcfour.c index 150a7aa..ad7ccec 100644 --- a/src/lib/crypto/builtin/arcfour/arcfour.c +++ b/src/lib/crypto/builtin/arcfour/arcfour.c @@ -186,6 +186,7 @@ krb5_arcfour_encrypt(const struct krb5_enc_provider *enc, free(d3.data); free(salt.data); free(plaintext.data); + krb5_k_free_key(NULL, k3key); return (ret); } diff --git a/src/lib/crypto/krb/key.c b/src/lib/crypto/krb/key.c index 4ea72b4..d6adcba 100644 --- a/src/lib/crypto/krb/key.c +++ b/src/lib/crypto/krb/key.c @@ -77,10 +77,12 @@ krb5_k_free_key(krb5_context context, krb5_key key) /* Free the derived key cache. */ while ((dk = key->derived) != NULL) { key->derived = dk->next; + free(dk->constant.data); krb5_k_free_key(context, dk->dkey); free(dk); } krb5int_c_free_keyblock_contents(context, &key->keyblock); + free(key); } /* Retrieve a copy of the keyblock from a krb5_key. */ diff --git a/src/lib/crypto/openssl/arcfour/arcfour.c b/src/lib/crypto/openssl/arcfour/arcfour.c index 2c89b99..719bfaa 100644 --- a/src/lib/crypto/openssl/arcfour/arcfour.c +++ b/src/lib/crypto/openssl/arcfour/arcfour.c @@ -187,6 +187,7 @@ krb5_arcfour_encrypt(const struct krb5_enc_provider *enc, free(d3.data); free(salt.data); free(plaintext.data); + krb5_k_free_key(NULL, k3key); return (ret); } |