]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: config: fix missing initialization in numa_detect_topology()
authorWilly Tarreau <w@1wt.eu>
Fri, 23 Apr 2021 17:09:16 +0000 (19:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 23 Apr 2021 17:09:16 +0000 (19:09 +0200)
The error path of the NUMA topology detection introduced in commit
b56a7c89a ("MEDIUM: cfgparse: detect numa and set affinity if needed")
lacks an initialization resulting in possible crashes at boot. No
backport is needed since that was introduced in 2.4-dev.

src/cfgparse.c

index f891697a1d2960b418a10aa21a579f01fc659b75..5fdee40f132a757e4c7c2c9dc27ddff4f19e1c19 100644 (file)
@@ -2079,6 +2079,7 @@ static int numa_detect_topology()
        ha_cpuset_zero(&node_cpu_set);
 
        /* 1. count the sysfs node<X> directories */
+       node_dirlist = NULL;
        node_dirlist_size = scandir(NUMA_DETECT_SYSTEM_SYSFS_PATH"/node", &node_dirlist, numa_filter, alphasort);
        if (node_dirlist_size <= 1)
                goto free_scandir_entries;