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:
parent
00b9ef09c0
commit
0a453e3be3
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue