From b54d35dcbb01f8a76a0d7e0514d906a3cc2a0879 Mon Sep 17 00:00:00 2001 From: "Raphael S. Carvalho" Date: Wed, 24 Jun 2015 16:34:52 -0300 Subject: [PATCH] sstables: fix use-after-free at the end of compaction Signed-off-by: Raphael S. Carvalho Reviewed-by: Nadav Har'El --- sstables/compaction.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sstables/compaction.cc b/sstables/compaction.cc index e4ca7e47fd..feadb274a5 100644 --- a/sstables/compaction.cc +++ b/sstables/compaction.cc @@ -63,7 +63,7 @@ future<> compact_sstables(std::vector sstables, auto newtab = creator(); future<> write_done = newtab->write_components( std::move(mutation_queue_reader), estimated_parititions, schema).then([newtab] { - return newtab->load(); + return newtab->load().then([newtab] {}); }); // Wait for both read_done and write_done fibers to finish.