diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index ca839864046c..0dbf54f0f519 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -880,6 +880,7 @@ public: { result.AppendError(error.AsCString("Remote connect failed")); result.SetStatus (eReturnStatusFailed); + target_sp->DeleteCurrentProcess(); return false; } }