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:
parent
7e139aafe0
commit
c3e646b47f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user