X509Common/SCT parsing: Fix memory leak in error case

Failed to free the copy of the OCSP extension's value the inner
octet string couldn't be parsed.
This commit is contained in:
Arne Welzel 2023-10-23 16:39:09 +02:00
parent a5b94f04fd
commit ab157777e3

View file

@ -209,6 +209,7 @@ void X509Common::ParseSignedCertificateTimestamps(X509_EXTENSION* ext)
ext_val->length); ext_val->length);
if ( ! inner ) if ( ! inner )
{ {
OPENSSL_free(ext_val_second_pointer);
reporter->Error( reporter->Error(
"X509::ParseSignedCertificateTimestamps could not parse inner octet string"); "X509::ParseSignedCertificateTimestamps could not parse inner octet string");
return; return;