fixed memory leak in Accept()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-02-20 16:34:23 +00:00
parent 7e139aafe0
commit c3e646b47f

View File

@ -1088,7 +1088,10 @@ wxSocketBase *wxSocketServer::Accept(bool wait)
sock->SetFlags(m_flags);
if (!AcceptWith(*sock, wait))
return NULL;
{
sock->Destroy();
sock = NULL;
}
return sock;
}