aboutsummaryrefslogtreecommitdiffstats
path: root/lib/krb5/crypto-evp.c
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2018-04-04 04:21:19 +0000
committerHiroki Sato <hrs@FreeBSD.org>2018-04-04 04:21:19 +0000
commitd684f11da759490a8d98d7b790796106285f4084 (patch)
tree27b7356df710fdf1440fe2c23154b8121e99f2ab /lib/krb5/crypto-evp.c
parentf52d4664e3f68828c06f85bfc1afa271e3e04713 (diff)
downloadsrc-vendor/heimdal.tar.gz
src-vendor/heimdal.zip
Notes
Notes: svn path=/vendor-crypto/heimdal/dist/; revision=331978 svn path=/vendor-crypto/heimdal/7.5.0/; revision=331979; tag=vendor/heimdal/7.5.0
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);