We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b49265e commit da3a53aCopy full SHA for da3a53a
tools/perf/util/map.c
@@ -577,10 +577,25 @@ static void __maps__purge(struct maps *maps)
577
}
578
579
580
+static void __maps__purge_names(struct maps *maps)
581
+{
582
+ struct rb_root *root = &maps->names;
583
+ struct rb_node *next = rb_first(root);
584
+
585
+ while (next) {
586
+ struct map *pos = rb_entry(next, struct map, rb_node_name);
587
588
+ next = rb_next(&pos->rb_node_name);
589
+ rb_erase_init(&pos->rb_node_name, root);
590
+ map__put(pos);
591
+ }
592
+}
593
594
static void maps__exit(struct maps *maps)
595
{
596
down_write(&maps->lock);
597
__maps__purge(maps);
598
+ __maps__purge_names(maps);
599
up_write(&maps->lock);
600
601
0 commit comments