We should free `tmpPacket` if socket.receive() fails. For example, `SocketTimeoutException` will occur every second.