From 241c7a94da483b8261ba74abcee522cac78a042c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 8 May 2021 17:10:06 +0300 Subject: [PATCH] Fix bad code in Keeper (found by PVS-Studio) --- src/Coordination/KeeperStorage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Coordination/KeeperStorage.cpp b/src/Coordination/KeeperStorage.cpp index 197cc4323cf..5f2d6141be9 100644 --- a/src/Coordination/KeeperStorage.cpp +++ b/src/Coordination/KeeperStorage.cpp @@ -103,7 +103,8 @@ struct KeeperStorageSyncRequest final : public KeeperStorageRequest std::pair process(KeeperStorage::Container & /* container */, KeeperStorage::Ephemerals & /* ephemerals */, int64_t /* zxid */, int64_t /* session_id */) const override { auto response = zk_request->makeResponse(); - dynamic_cast(response.get())->path = dynamic_cast(zk_request.get())->path; + dynamic_cast(*response).path + = dynamic_cast(*zk_request).path; return {response, {}}; } };