From: Willy Tarreau Date: Fri, 23 Apr 2021 17:09:16 +0000 (+0200) Subject: BUG/MEDIUM: config: fix missing initialization in numa_detect_topology() X-Git-Tag: v2.4-dev17~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07bf21cdcba90a73136b1ce402e358dd7d4a13d8;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index f891697a1d..5fdee40f13 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2079,6 +2079,7 @@ static int numa_detect_topology() ha_cpuset_zero(&node_cpu_set); /* 1. count the sysfs node 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;