3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-30 05:09:04 +00:00

Merge pull request #5358 from georgerennie/george/help_leak

help: fix memory leak for -dump-cells-json
This commit is contained in:
KrystalDelusion 2025-09-19 10:15:57 +12:00 committed by GitHub
commit 259bd6fb33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -956,13 +956,7 @@ struct HelpPass : public Pass {
auto name = it.first.str();
if (cell_help_messages.contains(name)) {
auto cell_help = cell_help_messages.get(name);
if (groups.count(cell_help.group) != 0) {
auto group_cells = &groups.at(cell_help.group);
group_cells->push_back(name);
} else {
auto group_cells = new vector<string>(1, name);
groups.emplace(cell_help.group, *group_cells);
}
groups[cell_help.group].emplace_back(name);
auto cell_pair = pair<SimHelper, CellType>(cell_help, it.second);
cells.emplace(name, cell_pair);
} else {