mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-24 23:40:39 +01:00
Compare commits
1 Commits
d36123a363
...
i212
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ba128ad33 |
@@ -194,7 +194,7 @@ void init_topology_struct(struct topology* topo, struct cache* cach) {
|
||||
topo->sockets = 0;
|
||||
#ifdef ARCH_X86
|
||||
topo->smt_available = 0;
|
||||
topo->apic = emalloc(sizeof(struct apic));
|
||||
topo->apic = ecalloc(1, sizeof(struct apic));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1170,8 +1170,10 @@ void print_raw(struct cpuInfo* cpu) {
|
||||
}
|
||||
|
||||
void free_topo_struct(struct topology* topo) {
|
||||
free(topo->apic->cache_select_mask);
|
||||
free(topo->apic->cache_id_apic);
|
||||
if(topo->apic->cache_select_mask != NULL)
|
||||
free(topo->apic->cache_select_mask);
|
||||
if(topo->apic->cache_id_apic != NULL)
|
||||
free(topo->apic->cache_id_apic);
|
||||
free(topo->apic);
|
||||
free(topo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user