From 98d067a1b7246f3e64fc91b894f77571d7dcb38b Mon Sep 17 00:00:00 2001 From: huangjun Date: Wed, 29 Sep 2021 15:32:23 +0800 Subject: [PATCH] tools/ceph-kvstore-tool: fix segfaults when repair the rocksdb It will not set the db handler in repair process as it's not need to open the db, that will cause db remains 0x0, then the db->repair() will cause the segfault. Fixes: https://tracker.ceph.com/issues/52756 Signed-off-by: huangjun (cherry picked from commit 28948358227d239ea3e8946601f9f54e3a790c08) --- src/tools/kvstore_tool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/kvstore_tool.cc b/src/tools/kvstore_tool.cc index d26a195880e..a9b47275664 100644 --- a/src/tools/kvstore_tool.cc +++ b/src/tools/kvstore_tool.cc @@ -38,8 +38,8 @@ StoreTool::StoreTool(const string& type, << cpp_strerror(r) << std::endl; exit(1); } - db.reset(db_ptr); } + db.reset(db_ptr); } } -- 2.47.3