The "ech" parameter of a bind line stores the ECH keys directory in
ssl_bind_conf.ech_filedir, and the bind-level ssl_conf goes through
ssl_sock_free_ssl_conf() in ssl_sock_free_bind_conf(), but the
function never freed the field: the string was leaked at each proxy
stop and start, so on every reload of a configuration using
"bind ... ssl ech <dir>".
Free ech_filedir in ssl_sock_free_ssl_conf(), guarded by USE_ECH like
its assignment in bind_parse_ech().
This must be backported to 3.4, 3.3, 3.2 and 3.1.
Reported-by: Dominik Maier <dmnk@google.com>
#endif
#if defined(SSL_CTX_set1_client_sigalgs_list)
ha_free(&conf->client_sigalgs);
+#endif
+#ifdef USE_ECH
+ ha_free(&conf->ech_filedir);
#endif
}
}