[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211119042607.48924-1-sohaib.amhmd@gmail.com>
Date: Fri, 19 Nov 2021 06:26:04 +0200
From: Sohaib Mohamed <sohaib.amhmd@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: sohaib.amhmd@...il.com, irogers@...gle.com,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Andi Kleen <ak@...ux.intel.com>,
Kan Liang <kan.liang@...ux.intel.com>,
Michael Petlan <mpetlan@...hat.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] perf machine: Free machine__findnew_dso
ASan reports memory leaks while running:
$ rm perf.data*
$ perf report
This patch adds the missing dso__put.
Fixes: 8c7f1bb37b29 ("perf machine: Move kernel mmap name into struct
machine")
Signed-off-by: Sohaib Mohamed <sohaib.amhmd@...il.com>
---
tools/perf/util/machine.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index fb8496df8432..826be7a12da1 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1742,6 +1742,8 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
*/
dso__load(kernel, machine__kernel_map(machine));
}
+
+ dso__put(kernel);
} else if (perf_event__is_extra_kernel_mmap(machine, xm)) {
return machine__process_extra_kernel_map(machine, xm);
}
--
2.25.1
Powered by blists - more mailing lists