Skip to content

Commit b59e571

Browse files
committed
ct/l1: fix use-after-free bug in get_compaction_infos()
D'oh!
1 parent b19f168 commit b59e571

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/v/cloud_topics/level_one/metastore/replicated_metastore.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,8 @@ replicated_metastore::get_compaction_infos(
759759
auto& request = partition_and_request.second;
760760
auto logs = request.logs.copy();
761761
return fe_.get_compaction_infos(std::move(request))
762-
.then([&resp, &logs](rpc::get_compaction_infos_reply reply) {
762+
.then([&resp, logs = std::move(logs)](
763+
rpc::get_compaction_infos_reply reply) {
763764
if (reply.ec != rpc::errc::ok) {
764765
for (const auto& l : logs) {
765766
resp[l.tp] = std::unexpected(

0 commit comments

Comments
 (0)