diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -741,6 +741,7 @@ if (cmd_args.GetArgumentCount() != 0 && m_arguments.empty()) { result.AppendErrorWithFormatv("'{0}' doesn't take any arguments.", GetCommandName()); + Cleanup(); return false; } handled = DoExecute(cmd_args, result);