From 47f9ef2ee5f3d9a79038fe8318c740a7c4345541 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Wed, 23 Feb 2011 01:41:23 +0100 Subject: Fix some wrong pointer dereferences --- erts/lib_src/common/erl_misc_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/lib_src') diff --git a/erts/lib_src/common/erl_misc_utils.c b/erts/lib_src/common/erl_misc_utils.c index 4c881993a5..ec729407bb 100644 --- a/erts/lib_src/common/erl_misc_utils.c +++ b/erts/lib_src/common/erl_misc_utils.c @@ -813,7 +813,7 @@ read_topology(erts_cpu_info_t *cpuinfo) cpuinfo->topology = malloc(sizeof(erts_cpu_topology_t) * cpuinfo->configured); - if (!cpuinfo) + if (!cpuinfo->topology) goto error; for (ix = 0; ix < cpuinfo->configured; ix++) { @@ -1023,7 +1023,7 @@ read_topology(erts_cpu_info_t *cpuinfo) cpuinfo->topology = malloc(sizeof(erts_cpu_topology_t) * cpuinfo->configured); - if (!cpuinfo) + if (!cpuinfo->topology) goto error; for (ix = 0; ix < cpuinfo->configured; ix++) { -- cgit v1.2.1