set pointer to null after freeing in InitOcspRequest() to prevent a subsequent double-free in FreeOcspRequest()

pull/6399/head
Brett Nicholas 2023-05-11 10:57:26 -06:00
parent 870f7cc95b
commit 46dce4b33f
1 changed files with 1 additions and 0 deletions

View File

@ -35260,6 +35260,7 @@ int InitOcspRequest(OcspRequest* req, DecodedCert* cert, byte useNonce,
DYNAMIC_TYPE_OCSP_REQUEST);
if (req->url == NULL) {
XFREE(req->serial, req->heap, DYNAMIC_TYPE_OCSP);
req->serial = NULL;
return MEMORY_E;
}