Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 9cf8b16

Browse files
authored
Merge pull request #1235 from poojanilangekar/memory_leak_fix
Fix memory leak in the insert_sql_test [Partial fix for #1212]
2 parents fa400ec + 10db626 commit 9cf8b16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/sql/insert_sql_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ TEST_F(InsertSQLTests, BadTypes) {
598598
query = "INSERT INTO foo(id5) VALUES('h');";
599599
EXPECT_THROW(TestingSQLUtil::GeneratePlanWithOptimizer(optimizer, query, txn),
600600
peloton::Exception);
601+
txn_manager.CommitTransaction(txn);
601602

602603
// free the database just created
603604
txn = txn_manager.BeginTransaction();
@@ -618,6 +619,7 @@ TEST_F(InsertSQLTests, NonExistentTable) {
618619
txn = txn_manager.BeginTransaction();
619620
EXPECT_THROW(TestingSQLUtil::GeneratePlanWithOptimizer(optimizer, query, txn),
620621
peloton::CatalogException);
622+
txn_manager.CommitTransaction(txn);
621623
}
622624

623625
} // namespace test

0 commit comments

Comments
 (0)