Fix dangling checkpoint pointer in db_stress (#4042)

Summary:
Fix db_stress failed to delete checkpoint pointer. It's caught by asan_crash test.
Closes https://github.com/facebook/rocksdb/pull/4042

Differential Revision: D8592604

Pulled By: yiwu-arbug

fbshipit-source-id: 7b2d67d5e3dfb05f71c33fcf320482303e97d3ef
This commit is contained in:
Yi Wu 2018-06-22 11:39:51 -07:00 committed by Facebook Github Bot
parent 64c85d0d97
commit c726f7fda8

View File

@ -1794,6 +1794,7 @@ class StressTest {
s = FLAGS_env->GetChildren(checkpoint_dir, &files);
}
DestroyDB(checkpoint_dir, Options());
delete checkpoint;
if (!s.ok()) {
printf("A checkpoint operation failed with: %s\n",
s.ToString().c_str());