1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

tls: wrapper: make sure alpn freed once

This commit is contained in:
Jed Lu 2021-02-02 09:26:09 +00:00 committed by Andy Green
parent 00b9ef09c0
commit 0a453e3be3

View file

@ -238,8 +238,10 @@ void SSL_CTX_free(SSL_CTX* ctx)
X509_free(ctx->client_CA);
if (ctx->alpn_protos)
if (ctx->alpn_protos) {
ssl_mem_free((void *)ctx->alpn_protos);
ctx->alpn_protos = NULL;
}
ssl_mem_free(ctx);
}
@ -353,8 +355,10 @@ void SSL_free(SSL *ssl)
SSL_SESSION_free(ssl->session);
if (ssl->alpn_protos)
if (ssl->alpn_protos) {
ssl_mem_free((void *)ssl->alpn_protos);
ssl->alpn_protos = NULL;
}
ssl_mem_free(ssl);
}