Fix use-after-free in c_tset

Summary:
Fix asan error introduce by #2823
Closes https://github.com/facebook/rocksdb/pull/2879

Differential Revision: D5828454

Pulled By: yiwu-arbug

fbshipit-source-id: 50777855667f4e7b634279a654c3bfa01a1ac729
This commit is contained in:
Yi Wu 2017-09-13 15:56:57 -07:00 committed by Facebook Github Bot
parent 2d6e42122b
commit a843df668b
1 changed files with 1 additions and 1 deletions

View File

@ -1549,7 +1549,6 @@ int main(int argc, char** argv) {
rocksdb_column_family_handle_destroy(cfh1);
rocksdb_column_family_handle_destroy(cfh2);
rocksdb_optimistictransactiondb_close_base_db(db);
rocksdb_optimistictransaction_options_destroy(otxn_options);
rocksdb_optimistictransactiondb_close(otxn_db);
// Check open optimistic transaction db with column families
@ -1585,6 +1584,7 @@ int main(int argc, char** argv) {
rocksdb_optimistictransactiondb_close(otxn_db);
rocksdb_destroy_db(db_options, dbname, &err);
rocksdb_options_destroy(db_options);
rocksdb_optimistictransaction_options_destroy(otxn_options);
CheckNoError(err);
}