aboutsummaryrefslogtreecommitdiffstats
path: root/lib/krb5/crypto-evp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/krb5/crypto-evp.c')
-rw-r--r--lib/krb5/crypto-evp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/krb5/crypto-evp.c b/lib/krb5/crypto-evp.c
index e8fb1caf6ae8..cab7c29061f7 100644
--- a/lib/krb5/crypto-evp.c
+++ b/lib/krb5/crypto-evp.c
@@ -72,10 +72,8 @@ _krb5_evp_encrypt(krb5_context context,
/* alloca ? */
size_t len2 = EVP_CIPHER_CTX_iv_length(c);
void *loiv = malloc(len2);
- if (loiv == NULL) {
- krb5_clear_error_message(context);
- return ENOMEM;
- }
+ if (loiv == NULL)
+ return krb5_enomem(context);
memset(loiv, 0, len2);
EVP_CipherInit_ex(c, NULL, NULL, NULL, loiv, -1);
free(loiv);