diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 83c3a3865..19a166aa9 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -69,6 +69,7 @@ #include #include #include +#include #include #include #include @@ -5445,6 +5446,8 @@ void ssl_sock_free_srv_ctx(struct server *srv) ha_free(&srv->ssl_ctx.verify_host); #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME ha_free(&srv->sni_expr); + release_sample_expr(srv->ssl_ctx.sni); + srv->ssl_ctx.sni = NULL; #endif ha_free(&srv->ssl_ctx.ciphers); #ifdef HAVE_SSL_CTX_SET_CIPHERSUITES