BUG/MEDIUM: config: fix missing initialization in numa_detect_topology()

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.
This commit is contained in:
Willy Tarreau 2021-04-23 19:09:16 +02:00
parent 2cc201f97e
commit 07bf21cdcb

View 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;