summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/crypto/builtin/arcfour/arcfour.c1
-rw-r--r--src/lib/crypto/krb/key.c2
-rw-r--r--src/lib/crypto/openssl/arcfour/arcfour.c1
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 150a7aa06..ad7ccec0b 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 4ea72b478..d6adcba74 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 2c89b99b8..719bfaabd 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);
}