diff options
Diffstat (limited to 'sim/system.cc')
-rw-r--r-- | sim/system.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sim/system.cc b/sim/system.cc index 40c841ed5..951739462 100644 --- a/sim/system.cc +++ b/sim/system.cc @@ -148,7 +148,10 @@ System::serialize(std::ostream &os) paramOut(os, csprintf("stacksize[%d]",i), size); for (int j=0; j<size; ++j) { top = stack->top(); - paramOut(os, csprintf("ctx[%d].stackpos[%d]",i,j), top->name); + paramOut(os, csprintf("ctx[%d].stackpos[%d]",i,j), + top->name); + delete top; + stack->pop(); } } } |