mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
BUG/MINOR: cpu-topo: check the correct variable for NULL after malloc()
We were testing ha_cpu_topo instead of ha_cpu_clusters after an allocation, making the check ineffective. No backport is needed.
This commit is contained in:
parent
39c05cedff
commit
4a44d592ae
@ -1822,7 +1822,7 @@ static int cpu_topo_alloc(void)
|
||||
|
||||
/* allocate the structures used to store CPU topology info */
|
||||
ha_cpu_clusters = (struct ha_cpu_cluster*)malloc(cpu_topo_maxcpus * sizeof(*ha_cpu_clusters));
|
||||
if (!ha_cpu_topo)
|
||||
if (!ha_cpu_clusters)
|
||||
return 0;
|
||||
|
||||
/* preset all fields to -1 except the index and the state flags which
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user