mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-04 07:30:52 +00:00
Fix unitialized memory
This commit is contained in:
parent
d199a2bf76
commit
00c190aeed
@ -163,12 +163,15 @@ struct SocketInterruptablePollWrapper
|
|||||||
{
|
{
|
||||||
UInt8 byte;
|
UInt8 byte;
|
||||||
read_result = read(pipe.fds_rw[0], &byte, sizeof(byte));
|
read_result = read(pipe.fds_rw[0], &byte, sizeof(byte));
|
||||||
if (byte == WATCH_RESPONSE_BYTE)
|
if (read_result > 0)
|
||||||
result |= HAS_WATCH_RESPONSE;
|
{
|
||||||
else if (byte == RESPONSE_BYTE)
|
if (byte == WATCH_RESPONSE_BYTE)
|
||||||
result |= HAS_RESPONSE;
|
result |= HAS_WATCH_RESPONSE;
|
||||||
else
|
else if (byte == RESPONSE_BYTE)
|
||||||
throw Exception("Unexpected byte received from signaling pipe", ErrorCodes::UNEXPECTED_PACKET_FROM_CLIENT);
|
result |= HAS_RESPONSE;
|
||||||
|
else
|
||||||
|
throw Exception("Unexpected byte received from signaling pipe", ErrorCodes::UNEXPECTED_PACKET_FROM_CLIENT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (read_result > 0 || (read_result < 0 && errno == EINTR));
|
while (read_result > 0 || (read_result < 0 && errno == EINTR));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user