From e416e800c837717e820282e246d44a90967bc286 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Wed, 22 Jul 2015 18:20:23 +0200 Subject: [PATCH] commitlog: Fix use-after-move "f" was passed to make_file_input_stream() after it was moved-from. --- db/commitlog/commitlog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/commitlog/commitlog.cc b/db/commitlog/commitlog.cc index 52e38270ae..6e1ab35214 100644 --- a/db/commitlog/commitlog.cc +++ b/db/commitlog/commitlog.cc @@ -718,7 +718,7 @@ subscription> db::commitlog::read_log_file(file f, commit size_t next = 0; bool eof = false; bool header = true; - work(file f) : f(std::move(f)), fin(make_file_input_stream(f)) {} + work(file f) : f(f), fin(make_file_input_stream(f)) {} }; auto w = make_lw_shared(std::move(f));