]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dcrypt: ctx_hmac_init() - Fix memory allocation failure handling with OpenSSL3
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 2 Aug 2024 11:14:14 +0000 (14:14 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 2 Aug 2024 11:14:14 +0000 (14:14 +0300)
src/lib-dcrypt/dcrypt-openssl3.c

index b497ebb824e0b576b411f62142a762ec220aad7d..534472d96f1da4edae295d363b284a3b78705833 100644 (file)
@@ -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);