[PATCH v1 04/17] perf symbol: Add missed dso__put

Ian Rogers posted 17 patches 1 week, 2 days ago
[PATCH v1 04/17] perf symbol: Add missed dso__put
Posted by Ian Rogers 1 week, 2 days ago
Add missing dso__put for the dso created in maps__split_kallsyms.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/symbol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index cc26b7bf302b..067754b5b667 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -985,6 +985,7 @@ static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta,
 				dso__put(ndso);
 				return -1;
 			}
+			dso__put(ndso);
 			++kernel_range;
 		} else if (delta) {
 			/* Kernel was relocated at boot time */
-- 
2.52.0.rc2.455.g230fcf2819-goog