diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 4b428ec01..c1df8dd47 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -840,6 +840,7 @@ bool MySQL_Session::handler_SetAutocommit(PtrSize_t *pkt) { autocommit=true; client_myds->myconn->set_autocommit(autocommit); autocommit_on_hostgroup=FindOneActiveTransaction(); + free(_new_pkt.ptr); return false; } else { // as there is no active transaction, we do no need to forward it