From 40154d69cf30dd22d7d4ae7bb836ca77064e4845 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Fri, 27 Nov 2020 09:16:24 +1000 Subject: [PATCH] OCSP callback: call embed free Leaks memory if not called. Configuration: ./configure --disable-shared --enable-ocsp --enable-sni C_EXTRA_FLAGS="-DWOLFSSL_NONBLOCK_OCSP" Leaking test: valgrind ./examples/client/client -X -C -h www.globalsign.com -p 443 -A certs/external/ca-globalsign-root.pem -g -o -N -v d -S www.globalsign.com --- wolfssl/test.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wolfssl/test.h b/wolfssl/test.h index b4543c1c2..226bb1a5a 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -1592,8 +1592,7 @@ static WC_INLINE int OCSPIOCb(void* ioCtx, const char* url, int urlSz, static WC_INLINE void OCSPRespFreeCb(void* ioCtx, unsigned char* response) { - (void)ioCtx; - (void)response; + return EmbedOcspRespFree(ioCtx, response); } #endif