Fix unitialized memory

This commit is contained in:
alesapin 2020-11-27 14:57:48 +03:00
parent d199a2bf76
commit 00c190aeed

View File

@ -163,6 +163,8 @@ struct SocketInterruptablePollWrapper
{
UInt8 byte;
read_result = read(pipe.fds_rw[0], &byte, sizeof(byte));
if (read_result > 0)
{
if (byte == WATCH_RESPONSE_BYTE)
result |= HAS_WATCH_RESPONSE;
else if (byte == RESPONSE_BYTE)
@ -170,6 +172,7 @@ struct SocketInterruptablePollWrapper
else
throw Exception("Unexpected byte received from signaling pipe", ErrorCodes::UNEXPECTED_PACKET_FROM_CLIENT);
}
}
while (read_result > 0 || (read_result < 0 && errno == EINTR));
if (read_result < 0 && errno != EAGAIN)