Fix double deletion in transaction_test (#5700)
Summary: Fix the following clang analyze failures: ``` In file included from utilities/transactions/transaction_test.cc:8: ./utilities/transactions/transaction_test.h:174:14: warning: Attempt to delete released memory delete root_db; ^ ``` The destructor of StackableDB already deletes the root db and there is no need to delete the db separately. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5700 Test Plan: USE_CLANG=1 TEST_TMPDIR=/dev/shm/rocksdb OPT=-g make -j24 analyze Differential Revision: D16800579 Pulled By: maysamyabandeh fbshipit-source-id: 64c2d70f23e07e6a15242add97c744902ea33be5
This commit is contained in:
parent
8a678a50ba
commit
90cd6c2bb1
@ -170,8 +170,6 @@ class TransactionTestBase : public ::testing::Test {
|
||||
}
|
||||
if (!s.ok()) {
|
||||
delete stackable_db;
|
||||
// just in case it was not deleted (and not set to nullptr).
|
||||
delete root_db;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
@ -207,8 +205,6 @@ class TransactionTestBase : public ::testing::Test {
|
||||
delete handles[0];
|
||||
if (!s.ok()) {
|
||||
delete stackable_db;
|
||||
// just in case it was not deleted (and not set to nullptr).
|
||||
delete root_db;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user