mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-27 15:22:19 +01:00
ocsp: fix memory leaks in OpenSSL compat layer
This commit is contained in:
11
src/ocsp.c
11
src/ocsp.c
@@ -917,12 +917,17 @@ out:
|
||||
|
||||
void wolfSSL_OCSP_RESPONSE_free(OcspResponse* response)
|
||||
{
|
||||
OcspEntry *s, *sNext;
|
||||
if (response == NULL)
|
||||
return;
|
||||
|
||||
if (response->single != NULL) {
|
||||
FreeOcspEntry(response->single, NULL);
|
||||
XFREE(response->single, NULL, DYNAMIC_TYPE_OCSP_ENTRY);
|
||||
|
||||
s = response->single;
|
||||
while (s != NULL) {
|
||||
sNext = s->next;
|
||||
FreeOcspEntry(s, NULL);
|
||||
XFREE(s, NULL, DYNAMIC_TYPE_OCSP_ENTRY);
|
||||
s = sNext;
|
||||
}
|
||||
|
||||
XFREE(response->source, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
Reference in New Issue
Block a user