initialize name length before calling getsockname()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9c26672d4d
commit
f16ba4bb7e
@ -255,7 +255,7 @@ void wxSocketImpl::PostCreation()
|
||||
|
||||
wxSocketError wxSocketImpl::UpdateLocalAddress()
|
||||
{
|
||||
WX_SOCKLEN_T lenAddr;
|
||||
WX_SOCKLEN_T lenAddr = sizeof(*m_local->m_addr);
|
||||
if ( getsockname(m_fd, m_local->m_addr, &lenAddr) != 0 )
|
||||
{
|
||||
Close();
|
||||
|
Loading…
Reference in New Issue
Block a user