]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: servers state: server port is used uninitialized
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Jan 2016 12:51:56 +0000 (13:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Jan 2016 12:51:56 +0000 (13:51 +0100)
Nenad spotted that the last fix was unfortunately wrong. Needs to be
backported to 1.6 as well.

src/server.c

index ab309abce52ef016b508970fe45a0babbd9c20a3..3a04d22f6abea09c3ef75dde57bb4511a367a7f5 100644 (file)
@@ -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);