Fix memleak in rsa_cms_decrypt
authorslontis <shane.lontis@oracle.com>
Thu, 16 Feb 2023 23:51:59 +0000 (09:51 +1000)
committerTomas Mraz <tomas@openssl.org>
Fri, 29 Dec 2023 09:39:34 +0000 (10:39 +0100)
commitd32dd65053431ee744d213b336b9a03a035807e6
tree519da6a2aa29f75e2451fd21b72756fce49bddb5
parent73ebaac827180bb51ccf807673758d7d06d5db21
Fix memleak in rsa_cms_decrypt

If a call to EVP_PKEY_CTX_set_rsa_mgf1_md() fails then the caller
needs to free the label.

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20319)
crypto/cms/cms_rsa.c