Merge tag 'drm-misc-next-2021-07-22' of git://anongit.freedesktop.org/drm/drm-misc...
[linux-2.6-microblaze.git] / tools / perf / util / dso.c
index d786cf6..ee15db2 100644 (file)
@@ -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;
 }