From 226f0188290ce7982792f2943eac5c89c1c94dec Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 2 Jul 2013 16:29:34 -0700 Subject: [PATCH] Fixed memory leak of http buffer in OCSP lookup. --- src/io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/io.c b/src/io.c index 407d7c3c6..a9f73bfb2 100644 --- a/src/io.c +++ b/src/io.c @@ -801,14 +801,17 @@ int EmbedOcspLookup(void* ctx, const char* url, int urlSz, close(sfd); if (ocspRespSz == 0) { CYASSL_MSG("OCSP response was not OK, no OCSP response"); + XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); return -1; } } else { CYASSL_MSG("OCSP Responder connection failed"); close(sfd); + XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); return -1; } + XFREE(httpBuf, NULL, DYNAMIC_TYPE_IN_BUFFER); return ocspRespSz; }