mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
83efd7170b
When successful, ossl_X509_ALGOR_from_nid() returns a pointer to an X509_ALGOR object. Inside ossl_X509_ALGOR_from_nid(), X509_ALGOR_set0() is called, and this passes ownership of the ASN1 object "los" (label octet string) to the X509_ALGOR object. When ossl_X509_ALGOR_from_nid() fails, ownership has not been passed on and we need to free "los". Change the scope of "los" and ensure it is freed on failure (on success, set it to NULL so it is not freed inside the function). Fixes #22336 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22495) |
||
---|---|---|
.. | ||
build.info | ||
cms_asn1.c | ||
cms_att.c | ||
cms_cd.c | ||
cms_dd.c | ||
cms_dh.c | ||
cms_ec.c | ||
cms_enc.c | ||
cms_env.c | ||
cms_err.c | ||
cms_ess.c | ||
cms_io.c | ||
cms_kari.c | ||
cms_lib.c | ||
cms_local.h | ||
cms_pwri.c | ||
cms_rsa.c | ||
cms_sd.c | ||
cms_smime.c |