[LLDB]Initialize accept_socket with nullptr

Fix high impact issue of illegal access of memory.
Initialize accept_socket with nullptr.

Differential Revision: https://reviews.llvm.org/D134293
This commit is contained in:
George Hu 2022-09-20 10:56:16 -07:00
parent 6257832bf9
commit 3ae633766b
1 changed files with 1 additions and 1 deletions

View File

@ -1233,7 +1233,7 @@ GDBRemoteCommunication::ConnectLocally(GDBRemoteCommunication &client,
listen_socket.Listen("localhost:0", backlog).ToError())
return error;
Socket *accept_socket;
Socket *accept_socket = nullptr;
std::future<Status> accept_status = std::async(
std::launch::async, [&] { return listen_socket.Accept(accept_socket); });