From: Ronen Friedman Date: Wed, 25 Oct 2023 07:24:18 +0000 (-0500) Subject: osd: fix use-after-move in build_incremental_map_msg() X-Git-Tag: v18.2.1~38^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F54267%2Fhead;p=ceph.git osd: fix use-after-move in build_incremental_map_msg() Fixes: https://tracker.ceph.com/issues/63310 Signed-off-by: Ronen Friedman (cherry picked from commit 9e2b8b0e8235b36e55310aab49b8f760e8d57cad) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index b4ee3c313cab..c61e7d33218a 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1418,14 +1418,14 @@ MOSDMap *OSDService::build_incremental_map_msg(epoch_t since, epoch_t to, for (epoch_t e = since + 1; e <= to; ++e) { bufferlist bl; if (get_inc_map_bl(e, bl)) { - m->incremental_maps[e] = std::move(bl); + m->incremental_maps[e] = bl; } else { dout(10) << __func__ << " missing incremental map " << e << dendl; if (!get_map_bl(e, bl)) { derr << __func__ << " also missing full map " << e << dendl; goto panic; } - m->maps[e] = std::move(bl); + m->maps[e] = bl; } max--; max_bytes -= bl.length();