diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 0c70788593c8..3c0d74fc1ff2 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; }