fix memory leak in db_stress checkpoint test (#7813)
Summary: fix memory leak in db_stress checkpoint test. If s is not ok, checkpoint is not deleted, may cause memory leak. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7813 Test Plan: make asan_check Reviewed By: cheng-chang Differential Revision: D25702999 Pulled By: zhichao-cao fbshipit-source-id: 08253b0852835acb8cfd412503cdabf720afb678
This commit is contained in:
parent
55e99688cc
commit
601585bca4
@ -1505,11 +1505,11 @@ Status StressTest::TestCheckpoint(ThreadState* thread,
|
||||
}
|
||||
}
|
||||
}
|
||||
delete checkpoint;
|
||||
checkpoint = nullptr;
|
||||
std::vector<ColumnFamilyHandle*> cf_handles;
|
||||
DB* checkpoint_db = nullptr;
|
||||
if (s.ok()) {
|
||||
delete checkpoint;
|
||||
checkpoint = nullptr;
|
||||
Options options(options_);
|
||||
options.listeners.clear();
|
||||
std::vector<ColumnFamilyDescriptor> cf_descs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user