Bug 1171464 - Check that socket isn't already closed before closing it, r=kmachulis

If we get a connection error, mSocket can end up being null in
RilConsumer::Close().
This commit is contained in:
Fredrik Lanker 2015-06-05 09:18:07 +02:00
parent a325b2aa4e
commit 5c12ebb9b7

View File

@ -273,8 +273,10 @@ RilConsumer::Send(UnixSocketRawData* aRawData)
void
RilConsumer::Close()
{
mSocket->Close();
mSocket = nullptr;
if (mSocket) {
mSocket->Close();
mSocket = nullptr;
}
}
// |StreamSocketConnector|