From 28948358227d239ea3e8946601f9f54e3a790c08 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 --- 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 1e01b1792e7..dfa600e8394 100644 --- a/src/tools/kvstore_tool.cc +++ b/src/tools/kvstore_tool.cc @@ -42,8 +42,8 @@ StoreTool::StoreTool(const string& type, << cpp_strerror(r) << std::endl; exit(1); } - db.reset(db_ptr); } + db.reset(db_ptr); } } -- 2.47.3