x509: Avoid memory leak if multiple nonce extensions are found in OCSP response

This commit is contained in:
Tobias Brunner
2026-07-23 10:26:08 +02:00
parent 7a316d9159
commit 7bf9b6bad8
@@ -728,6 +728,7 @@ static bool parse_basicOCSPResponse(private_x509_ocsp_response_t *this,
asn1_parse_simple_object(&object, ASN1_OCTET_STRING, asn1_parse_simple_object(&object, ASN1_OCTET_STRING,
parser->get_level(parser)+1, "nonce")) parser->get_level(parser)+1, "nonce"))
{ {
chunk_free(&this->nonce);
this->nonce = chunk_clone(object); this->nonce = chunk_clone(object);
} }
break; break;