From f3c7a83accebeaf1ac66f9b30238e8db4e6cd278 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 21 Jan 2016 13:51:56 +0100 Subject: [PATCH] BUG/MEDIUM: servers state: server port is used uninitialized Nenad spotted that the last fix was unfortunately wrong. Needs to be backported to 1.6 as well. --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index ab309abce..3a04d22f6 100644 --- a/src/server.c +++ b/src/server.c @@ -2162,7 +2162,7 @@ static void srv_update_state(struct server *srv, int version, char **params) int port; /* save the port, applies the new IP then reconfigure the port */ - get_host_port(&srv->addr); + port = get_host_port(&srv->addr); srv->addr.ss_family = addr.ss_family; str2ip2(params[0], &srv->addr, srv->addr.ss_family); set_host_port(&srv->addr, port);