mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue