[otbn] Fix silly memory leak in otbn_top_sim
I even wrote explicitly that VerilatorMemUtil didn't take ownership of
its argument, but apparently forgot when I used it. D'oh.
Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
diff --git a/hw/ip/otbn/dv/verilator/otbn_top_sim.cc b/hw/ip/otbn/dv/verilator/otbn_top_sim.cc
index e8b803b..d3f672b 100644
--- a/hw/ip/otbn/dv/verilator/otbn_top_sim.cc
+++ b/hw/ip/otbn/dv/verilator/otbn_top_sim.cc
@@ -93,7 +93,8 @@
int main(int argc, char **argv) {
otbn_top_sim top;
- VerilatorMemUtil memutil(new OtbnMemUtil("TOP.otbn_top_sim"));
+ OtbnMemUtil otbn_memutil("TOP.otbn_top_sim");
+ VerilatorMemUtil memutil(&otbn_memutil);
OtbnTraceUtil traceutil;
VerilatorSimCtrl &simctrl = VerilatorSimCtrl::GetInstance();