Potential memory leak fix (#39)

Co-authored-by: Antonio Andelic <antonio.andelic@memgraph.io>
This commit is contained in:
antonio2368 2020-11-09 12:47:15 +01:00 committed by GitHub
parent 6fab357430
commit f0382c82cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1162,11 +1162,13 @@ void Interpreter::BeginTransaction() {
void Interpreter::CommitTransaction() {
const auto prepared_query = PrepareTransactionQuery("COMMIT");
prepared_query.query_handler(nullptr, {});
query_executions_.clear();
}
void Interpreter::RollbackTransaction() {
const auto prepared_query = PrepareTransactionQuery("ROLLBACK");
prepared_query.query_handler(nullptr, {});
query_executions_.clear();
}
Interpreter::PrepareResult Interpreter::Prepare(