Tests: Fix leak found by previous commit

This commit is contained in:
Wilson Snyder
2021-02-25 20:38:38 -05:00
parent e1a48dcb07
commit dad86b9a84
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -786,8 +786,8 @@ private:
// Static doesn't need save-restore as if below will re-fill proper value
stmt += "static int __Vfuncnum = -1;\n";
// First time init (faster than what the compiler does if we did a singleton
stmt += "if (VL_UNLIKELY(__Vfuncnum == -1)) { __Vfuncnum = Verilated::exportFuncNum(\""
+ nodep->cname() + "\"); }\n";
stmt += "if (VL_UNLIKELY(__Vfuncnum == -1)) __Vfuncnum = Verilated::exportFuncNum(\""
+ nodep->cname() + "\");\n";
// If the find fails, it will throw an error
stmt += "const VerilatedScope* __Vscopep = Verilated::dpiScope();\n";
// If dpiScope is fails and is null; the exportFind function throws and error