Skip to content

Commit 3bdd76e

Browse files
authored
Merge pull request ceph#57878 from Suyashd999/fix-uam4
cls: avoid reusing moved-from buffers in cls_queue_src.cc
2 parents ef17939 + 02e9a4c commit 3bdd76e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cls/queue/cls_queue_src.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,11 @@ int queue_list_entries(cls_method_context_t hctx, const cls_queue_list_op& op, c
327327
}
328328

329329
//If there is leftover data from previous iteration, append new data to leftover data
330-
uint64_t entry_start_offset = start_offset - bl.length();
330+
uint64_t entry_start_offset = start_offset - bl.length(); //NOLINT(bugprone-use-after-move)
331331
CLS_LOG(20, "INFO: queue_list_entries(): Entry start offset accounting for leftover data is %lu", entry_start_offset);
332332
bl.claim_append(bl_chunk);
333333
bl_chunk = std::move(bl);
334-
334+
bl.clear(); //NOLINT(bugprone-use-after-move)
335335
CLS_LOG(20, "INFO: queue_list_entries(): size of chunk %u", bl_chunk.length());
336336

337337
//Process the chunk of data read

0 commit comments

Comments
 (0)