]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: config: a stats-less config crashes in 1.5-dev25
authorWilly Tarreau <w@1wt.eu>
Tue, 13 May 2014 11:37:54 +0000 (13:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 13 May 2014 11:53:27 +0000 (13:53 +0200)
John-Paul Bader reported a stupid regression in 1.5-dev25, we
forget to check that global.stats_fe is initialized before visiting
its sockets, resulting in a crash.

No backport is needed.

src/cfgparse.c

index decdcfd0e2fca1643021e8361cf2091a2b4ef6fb..9ec69a1f83b56be60987343ab4340428780bef59 100644 (file)
@@ -6950,7 +6950,7 @@ out_uri_auth_compat:
        }
 
        /* Check multi-process mode compatibility */
-       if (global.nbproc > 1) {
+       if (global.nbproc > 1 && global.stats_fe) {
                list_for_each_entry(bind_conf, &global.stats_fe->conf.bind, by_fe) {
                        unsigned long mask;