BUG/MINOR: ssl: ocsp structure not freed properly in case of error

In case of error, the ocsp item might already be in the ocsp certificate
tree but simply freed instead of destroyed through ssl_sock_free_ocsp.

This patch can be backported to all stable versions.
This commit is contained in:
Remi Tricot-Le Breton 2022-11-03 15:16:49 +01:00 committed by William Lallemand
parent 1621dc1cc5
commit aa529f776d

View File

@ -1594,7 +1594,7 @@ static int ssl_sock_load_ocsp(SSL_CTX *ctx, const struct cert_key_and_chain *ckc
OCSP_CERTID_free(cid); OCSP_CERTID_free(cid);
if (ocsp) if (ocsp)
free(ocsp); ssl_sock_free_ocsp(ocsp);
if (warn) if (warn)
free(warn); free(warn);