mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
Fixed memory leak of http buffer in OCSP lookup.
This commit is contained in:
3
src/io.c
3
src/io.c
@@ -801,14 +801,17 @@ int EmbedOcspLookup(void* ctx, const char* url, int urlSz,
|
|||||||
close(sfd);
|
close(sfd);
|
||||||
if (ocspRespSz == 0) {
|
if (ocspRespSz == 0) {
|
||||||
CYASSL_MSG("OCSP response was not OK, no OCSP response");
|
CYASSL_MSG("OCSP response was not OK, no OCSP response");
|
||||||
|
XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CYASSL_MSG("OCSP Responder connection failed");
|
CYASSL_MSG("OCSP Responder connection failed");
|
||||||
close(sfd);
|
close(sfd);
|
||||||
|
XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER);
|
||||||
return ocspRespSz;
|
return ocspRespSz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user