diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index ab2e130dc07a..7f07a5dc555f 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -1086,8 +1086,10 @@ struct map *dso__new_map(const char *name) struct map *map = NULL; struct dso *dso = dso__new(name); - if (dso) + if (dso) { map = map__new2(0, dso); + dso__put(dso); + } return map; }