nfs4: Clear PeerAddress before attempting to get local address

If PeerAddress is cleared before invoking GetLocalAddress() we make sure
it won't contain any garbage data in a very unlike case when getsockname()
fails.
This commit is contained in:
Pawel Dziepak 2013-06-13 01:03:43 +02:00
parent 7a66a8375d
commit b92a3dcc61

View File

@ -87,6 +87,8 @@ CallbackServer::LocalID()
PeerAddress address;
ASSERT(fListener != NULL);
memset(&address, 0, sizeof(address));
fListener->GetLocalAddress(&address);
return address;
}