Skip to content

Commit

Permalink
fix sanitizer error in nginx test
Browse files Browse the repository at this point in the history
  • Loading branch information
miyazakh committed Aug 2, 2024
1 parent b9864aa commit 8081974
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -3531,6 +3531,7 @@ static int TLSX_CSR_Parse(WOLFSSL* ssl, const byte* input, word16 length,
return ret;
}
FreeDecodedCert(cert);
XFREE(cert, ssl->heap, DYNAMIC_TYPE_DCERT);
extension = TLSX_Find(ssl->extensions, TLSX_STATUS_REQUEST);
csr = extension ?
(CertificateStatusRequest*)extension->data : NULL;
Expand All @@ -3545,14 +3546,12 @@ static int TLSX_CSR_Parse(WOLFSSL* ssl, const byte* input, word16 length,
FreeOcspRequest(request);
XFREE(request, ssl->heap, DYNAMIC_TYPE_OCSP_REQUEST);
}
if (ret != 0) {
XFREE(cert, ssl->heap, DYNAMIC_TYPE_DCERT);
if (ret != 0)
return ret;
}

if (csr->responses[0].buffer)
TLSX_SetResponse(ssl, TLSX_STATUS_REQUEST);
#if defined(HAVE_CSR_TLS13MULTI)
XFREE(cert, ssl->heap, DYNAMIC_TYPE_DCERT);
/* process OCSP request in certificate chain */
if ((ret = ProcessChainOCSPRequest(ssl)) != 0) {
WOLFSSL_MSG("Process Cert Chain OCSP request failed");
Expand Down

0 comments on commit 8081974

Please sign in to comment.