[PATCH v2 17/26] perf maps: Fix overlapping memory leak
Ian Rogers
irogers at google.com
Thu Jun 8 16:28:14 PDT 2023
Add a missed free detected by leak sanitizer.
Signed-off-by: Ian Rogers <irogers at google.com>
---
tools/perf/util/maps.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/maps.c b/tools/perf/util/maps.c
index 5206a6433117..233438c95b53 100644
--- a/tools/perf/util/maps.c
+++ b/tools/perf/util/maps.c
@@ -374,6 +374,7 @@ int maps__fixup_overlappings(struct maps *maps, struct map *map, FILE *fp)
}
put_map:
map__put(pos->map);
+ free(pos);
}
up_write(maps__lock(maps));
return err;
--
2.41.0.162.gfafddb0af9-goog
More information about the linux-arm-kernel
mailing list