From 215ec2be984ec9baa0eb8516df9b6a486ee9f36c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 13 Jul 2018 20:27:58 +0300 Subject: [PATCH] Tiny improvement [#CLICKHOUSE-3820] --- dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp b/dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp index fa39f857a4a..8b80e74c96d 100644 --- a/dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp +++ b/dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp @@ -1021,6 +1021,10 @@ void ZooKeeper::receiveEvent() { tryLogCurrentException(__PRETTY_FUNCTION__); + /// Unrecoverable. Don't leave incorrect state in memory. + if (!response) + std::terminate(); + response->error = ZMARSHALLINGERROR; if (request_info.callback) request_info.callback(*response);