diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 071b0d5396..b76cfe809a 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -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();