]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: check: fix memory leak in "tcp-check connect" over SSL
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Feb 2014 16:53:37 +0000 (17:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Feb 2014 16:55:04 +0000 (17:55 +0100)
tcp-check must not reinitialize the SSL stack upon each check!
It's done once after the config parsing and leaks memory and eats
performance when done upon every check.

This bug was introduced in 1.5-dev22, no backport is needed.

src/checks.c

index c9a531f32ede9ed350a131ac3d6389f845fdc0ee..1a3e865b87483e16767210a0aaa21762291c110d 100644 (file)
@@ -2091,7 +2091,6 @@ static void tcpcheck_main(struct connection *conn)
 #ifdef USE_OPENSSL
                        if (check->current_step->conn_opts & TCPCHK_OPT_SSL) {
                                xprt = &ssl_sock;
-                               ssl_sock_prepare_srv_ctx(s, s->proxy);
                        }
                        else {
                                xprt = &raw_sock;