diff options
Diffstat (limited to 'crypto/evp/bio_enc.c')
-rw-r--r-- | crypto/evp/bio_enc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index 30f09e6d5f..d48c826e05 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -65,9 +65,10 @@ static int enc_new(BIO *bi) { BIO_ENC_CTX *ctx; - ctx = OPENSSL_zalloc(sizeof(*ctx)); - if (ctx == NULL) + if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) { + EVPerr(EVP_F_ENC_NEW, ERR_R_MALLOC_FAILURE); return 0; + } ctx->cipher = EVP_CIPHER_CTX_new(); if (ctx->cipher == NULL) { |