diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index d786cf6b0cfa65f2af5209cb97e36b71774d0d3b..ee15db2be2f434035d0a7e5cbff0fc407bcda4bc 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -1154,8 +1154,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; }