diff --git a/db/version_set.cc b/db/version_set.cc index db8808687..f71ffce95 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -2436,7 +2436,6 @@ Status VersionSet::DumpManifest(Options& options, std::string& dscname, v->storage_info()->num_levels() - 1); cfd->compaction_picker()->SizeBeingCompacted(size_being_compacted); v->PrepareApply(*cfd->GetLatestMutableCFOptions(), size_being_compacted); - delete builder; printf("--------------- Column family \"%s\" (ID %u) --------------\n", cfd->GetName().c_str(), (unsigned int)cfd->GetID()); @@ -2451,6 +2450,11 @@ Status VersionSet::DumpManifest(Options& options, std::string& dscname, delete v; } + // Free builders + for (auto& builder : builders) { + delete builder.second; + } + next_file_number_.store(next_file + 1); last_sequence_ = last_sequence; prev_log_number_ = previous_log_number;