/* If not using logical core numbering, set core id */
if (!config_lcn) {
if (topology.num_packages > 1)
- snprintf(name, sizeof(name), "pkg%02d-core%02d", p->package_id, c->core_id);
+ snprintf(name, sizeof(name), "pkg%02d-core%02d", p->package_id,
+ c->core_id);
else
snprintf(name, sizeof(name), "core%02d", c->core_id);
}
*cores = calloc(total_cores, sizeof(struct core_data));
if (*cores == NULL) {
ERROR("turbostat plugin: calloc failed");
- sfree(threads);
+ sfree(*threads);
return -1;
}
*packages = calloc(topology.num_packages, sizeof(struct pkg_data));
if (*packages == NULL) {
ERROR("turbostat plugin: calloc failed");
- sfree(cores);
- sfree(threads);
+ sfree(*cores);
+ sfree(*threads);
return -1;
}