summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/crypto/string_to_key.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/crypto/string_to_key.c b/src/lib/crypto/string_to_key.c
index 03165ab25d..71d9db6501 100644
--- a/src/lib/crypto/string_to_key.c
+++ b/src/lib/crypto/string_to_key.c
@@ -93,6 +93,8 @@ krb5_c_string_to_key_with_params(krb5_context context, krb5_enctype enctype,
if (ret) {
memset(key->contents, 0, keylength);
free(key->contents);
+ key->length = 0;
+ key->contents = NULL;
}
return(ret);