Index: src/debug-agent.cc |
diff --git a/src/debug-agent.cc b/src/debug-agent.cc |
index 10c0053fab7eac043a428abfaf5ce14dc0cfa2df..12c8931ef154cabecd7d85e891ff7c05bc095b14 100644 |
--- a/src/debug-agent.cc |
+++ b/src/debug-agent.cc |
@@ -157,7 +157,9 @@ void DebuggerAgent::OnSessionClosed(DebuggerAgentSession* session) { |
ScopedLock with(session_access_); |
ASSERT(session == session_); |
if (session == session_) { |
- CloseSession(); |
+ session_->Shutdown(); |
+ delete session_; |
+ session_ = NULL; |
} |
} |