Skip to content
Open
16 changes: 16 additions & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3050,6 +3050,10 @@ void SSL_CtxResourceFree(WOLFSSL_CTX* ctx)
#ifdef HAVE_TLS_EXTENSIONS
#if !defined(NO_TLS)
TLSX_FreeAll(ctx->extensions, ctx->heap);
#ifdef OPENSSL_EXTRA
TLSX_CustomExt_FreeAll(ctx->customExt, ctx->heap);
ctx->customExt = NULL;
#endif
#endif /* !NO_TLS */
#ifndef NO_WOLFSSL_SERVER
#if defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
Expand Down Expand Up @@ -9056,6 +9060,18 @@ void wolfSSL_ResourceFree(WOLFSSL* ssl)
#if !defined(NO_TLS)
TLSX_FreeAll(ssl->extensions, ssl->heap);
ssl->extensions = NULL;
#ifdef OPENSSL_EXTRA
if (ssl->customExtData != NULL) {
XFREE(ssl->customExtData, ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
ssl->customExtData = NULL;
ssl->customExtSz = 0;
}
if (ssl->customExtSent != NULL) {
XFREE(ssl->customExtSent, ssl->heap, DYNAMIC_TYPE_TLSX);
ssl->customExtSent = NULL;
ssl->customExtSentCnt = 0;
}
#endif
#if defined(HAVE_SECURE_RENEGOTIATION) \
|| defined(HAVE_SERVER_RENEGOTIATION_INFO)
ssl->secure_renegotiation = NULL;
Expand Down
Loading
Loading