aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/machine.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 0b4a05c14204..7f5071a4d9aa 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -565,7 +565,7 @@ struct map *machine__findnew_module_map(struct machine *machine, u64 start,
565 const char *filename) 565 const char *filename)
566{ 566{
567 struct map *map = NULL; 567 struct map *map = NULL;
568 struct dso *dso; 568 struct dso *dso = NULL;
569 struct kmod_path m; 569 struct kmod_path m;
570 570
571 if (kmod_path__parse_name(&m, filename)) 571 if (kmod_path__parse_name(&m, filename))
@@ -589,6 +589,8 @@ struct map *machine__findnew_module_map(struct machine *machine, u64 start,
589 /* Put the map here because map_groups__insert alread got it */ 589 /* Put the map here because map_groups__insert alread got it */
590 map__put(map); 590 map__put(map);
591out: 591out:
592 /* put the dso here, corresponding to machine__findnew_module_dso */
593 dso__put(dso);
592 free(m.name); 594 free(m.name);
593 return map; 595 return map;
594} 596}