summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/simple_thread.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc
index 219167e4e..48383ca93 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -314,9 +314,10 @@ SimpleThread::getVirtPort(ThreadContext *src_tc)
void
SimpleThread::delVirtPort(VirtualPort *vp)
{
-// assert(!vp->nullThreadContext());
- delete vp->getPeer();
- delete vp;
+ if (vp != virtPort) {
+ delete vp->getPeer();
+ delete vp;
+ }
}