commitlog: Fix use-after-move

"f" was passed to make_file_input_stream() after it was moved-from.
This commit is contained in:
Tomasz Grabiec
2015-07-22 18:20:23 +02:00
committed by Avi Kivity
parent 3d867fc808
commit e416e800c8

View File

@@ -718,7 +718,7 @@ subscription<temporary_buffer<char>> 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<work>(std::move(f));