do_sigver_init: Add missing ERR_clear_last_mark()
authorTomas Mraz <tomas@openssl.org>
Thu, 22 Jul 2021 13:25:32 +0000 (15:25 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 23 Jul 2021 14:37:39 +0000 (16:37 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16138)

crypto/evp/m_sigver.c

index ae79562e2d03a487022a7cd6c4c947a7822a61d8..f21865a8c3c0a71d6533d1e3e8089ec15064cf66 100644 (file)
@@ -87,6 +87,7 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
     provkey = evp_pkey_export_to_provider(locpctx->pkey, locpctx->libctx,
                                           &tmp_keymgmt, locpctx->propquery);
     if (provkey == NULL) {
+        ERR_clear_last_mark();
         ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
         goto err;
     }