mirror of
https://github.com/verilator/verilator.git
synced 2025-07-31 07:56:10 +00:00
Tests: Fix leak found by previous commit
This commit is contained in:
parent
e1a48dcb07
commit
dad86b9a84
@ -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
|
||||
|
@ -90,6 +90,7 @@ int main(int argc, char** argv, char** env) {
|
||||
|
||||
#ifdef TEST_HDR_TRACE
|
||||
if (tfp) tfp->close();
|
||||
VL_DO_DANGLING(delete tfp, tfp);
|
||||
#endif
|
||||
|
||||
VL_DO_DANGLING(delete ap, ap);
|
||||
|
Loading…
Reference in New Issue
Block a user