diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 0c70788593c8d3db6e18994f81088591da4de0a5..3c0d74fc1ff26a7b52c7a627cf87561bcae9c06a 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1114,7 +1114,7 @@ static int cpu_cache_level__read(struct cpu_cache_level *cache, u32 cpu, u16 lev scnprintf(file, PATH_MAX, "%s/shared_cpu_list", path); if (sysfs__read_str(file, &cache->map, &len)) { - free(cache->map); + free(cache->size); free(cache->type); return -1; }