mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Plug memory leaks (#5016)
This commit is contained in:
@@ -168,6 +168,11 @@ AstVar* V3ParseGrammar::createVariable(FileLine* fileline, const string& name,
|
||||
if (GRAMMARP->m_varIO == VDirection::NONE && GRAMMARP->m_varDecl == VVarType::PORT) {
|
||||
// Just a port list with variable name (not v2k format); AstPort already created
|
||||
if (dtypep) fileline->v3warn(E_UNSUPPORTED, "Unsupported: Ranges ignored in port-lists");
|
||||
if (arrayp) VL_DO_DANGLING(arrayp->deleteTree(), arrayp);
|
||||
if (attrsp) {
|
||||
// TODO: Merge attributes across list? Or warn attribute is ignored
|
||||
VL_DO_DANGLING(attrsp->deleteTree(), attrsp);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
if (GRAMMARP->m_varDecl == VVarType::WREAL) {
|
||||
|
||||
Reference in New Issue
Block a user