From: Timo Sirainen Date: Fri, 2 Aug 2024 11:14:14 +0000 (+0300) Subject: lib-dcrypt: ctx_hmac_init() - Fix memory allocation failure handling with OpenSSL3 X-Git-Tag: 2.4.0~1523 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db35da419193d3a7810d48135c44e1ef02cbf2a2;p=thirdparty%2Fdovecot%2Fcore.git lib-dcrypt: ctx_hmac_init() - Fix memory allocation failure handling with OpenSSL3 --- diff --git a/src/lib-dcrypt/dcrypt-openssl3.c b/src/lib-dcrypt/dcrypt-openssl3.c index b497ebb824..534472d96f 100644 --- a/src/lib-dcrypt/dcrypt-openssl3.c +++ b/src/lib-dcrypt/dcrypt-openssl3.c @@ -630,7 +630,7 @@ dcrypt_openssl_ctx_hmac_init(struct dcrypt_context_hmac *ctx, }; ctx->ctx = EVP_MAC_CTX_new(ctx->mac); if (ctx->ctx == NULL) - dcrypt_openssl_error(error_r); + return dcrypt_openssl_error(error_r); ec = EVP_MAC_init(ctx->ctx, ctx->key, ctx->klen, params); if (ec != 1) return dcrypt_openssl_error(error_r);