aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@gmail.com>2018-02-20 01:31:23 -0500
committerMarat Dukhan <maratek@gmail.com>2018-02-20 01:31:23 -0500
commita9e55a6afde89722af7ee30dc7bd27435e96226b (patch)
tree2203f0a02b985ab99265aaf140c3e6748789148d
parentd72e1ce119a357eaec22e1ea7b146d789f61b827 (diff)
downloadcpuinfo-a9e55a6afde89722af7ee30dc7bd27435e96226b.tar.gz
Fix uninitialized memory bug on macOS
-rw-r--r--src/x86/mach/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/x86/mach/init.c b/src/x86/mach/init.c
index 75404f1..db162e1 100644
--- a/src/x86/mach/init.c
+++ b/src/x86/mach/init.c
@@ -48,6 +48,7 @@ void cpuinfo_x86_mach_init(void) {
}
struct cpuinfo_x86_processor x86_processor;
+ memset(&x86_processor, 0, sizeof(x86_processor));
cpuinfo_x86_init_processor(&x86_processor);
const uint32_t threads_per_core = mach_topology.threads / mach_topology.cores;