]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/onode-staged-tree: fix an use-after-free issue in test
authorYingxin Cheng <yingxin.cheng@intel.com>
Tue, 25 May 2021 06:21:21 +0000 (14:21 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Tue, 25 May 2021 06:21:21 +0000 (14:21 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/test/crimson/seastore/onode_tree/test_staged_fltree.cc

index 86c44c0804046a849c7d1622ba63d8e3c91a27e5..250e1ddcd9aab35e4bdf1522188fcc1945eb3e73 100644 (file)
@@ -1076,8 +1076,9 @@ class DummyChildPool {
         p_keys = &left->impl->get_keys();
       }
       left->impl->reset(*p_keys, left_is_tail);
+      auto left_addr = left->impl->laddr();
       return left->parent_info().ptr->apply_children_merge<true>(
-          c, std::move(left), left->impl->laddr(), std::move(right), !stole_key);
+          c, std::move(left), left_addr, std::move(right), !stole_key);
     }
 
     DummyChildImpl* impl;