diff options
author | Siying Dong <siying.d@fb.com> | 2018-08-20 17:31:28 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-08-20 17:43:41 -0700 |
commit | d5612b43defa8e2ad9641779763434a808fdcbd0 (patch) | |
tree | 7610e16939e52a122bb5190bb14cd330c0723b47 /db | |
parent | dc064f302e1482d8c4a9cdbe4fc8fa62f91cedf3 (diff) |
Two code changes to make "clang analyze" happy (#4292)
Summary:
Clang analyze is not happy in two pieces of code, with "Potential memory leak". No idea what the problem but slightly changing the code makes clang happy.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4292
Differential Revision: D9413555
Pulled By: siying
fbshipit-source-id: 9428c9d3664530c72129feefd135ee63d8386137
Diffstat (limited to 'db')
-rw-r--r-- | db/version_builder.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db/version_builder.cc b/db/version_builder.cc index d6ad0c55f..b1f558f6f 100644 --- a/db/version_builder.cc +++ b/db/version_builder.cc @@ -384,7 +384,7 @@ class VersionBuilder::Rep { } std::atomic<size_t> next_file_meta_idx(0); - std::function<void()> load_handlers_func = [&]() { + std::function<void()> load_handlers_func([&]() { while (true) { size_t file_idx = next_file_meta_idx.fetch_add(1); if (file_idx >= files_meta.size()) { @@ -405,7 +405,7 @@ class VersionBuilder::Rep { file_meta->table_reader_handle); } } - }; + }); std::vector<port::Thread> threads; for (int i = 1; i < max_threads; i++) { |