diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 8b303ff20289a8ffb4baff9e29292dd47e9068eb..0487d7795f135b13bbd94f45bbfe7c5c46aca226 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -585,6 +585,8 @@ struct map *machine__findnew_module_map(struct machine *machine, u64 start, map_groups__insert(&machine->kmaps, map); + /* Put the map here because map_groups__insert alread got it */ + map__put(map); out: free(m.name); return map;