]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
eddsa_signverify_init(): Avoid memory leak on error
authorTomas Mraz <tomas@openssl.org>
Tue, 21 Jan 2025 13:42:28 +0000 (14:42 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 23 Jan 2025 11:09:13 +0000 (12:09 +0100)
Add missing WPACKET_cleanup() call.
Fixes Coverity 1638693

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26500)

providers/implementations/signature/eddsa_sig.c

index b045f6642ade7b0591849ac939499304d59df11b..feb6e80347f2cf7c44b823a9c480330a4f36806f 100644 (file)
@@ -277,6 +277,7 @@ static int eddsa_signverify_init(void *vpeddsactx, void *vedkey)
         ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR);
         ossl_ecx_key_free(edkey);
         peddsactx->key = NULL;
+        WPACKET_cleanup(&pkt);
         return 0;
     }
     if (ret && WPACKET_finish(&pkt)) {