diff --git a/src/observer/session/session_stage.cpp b/src/observer/session/session_stage.cpp index 849830ecb9c9397d0eb2dead5e15d789387be23b..49a7ece17420d226bc4b3885690f1667344d28a2 100644 --- a/src/observer/session/session_stage.cpp +++ b/src/observer/session/session_stage.cpp @@ -100,8 +100,8 @@ void SessionStage::handle_request(StageEvent *event) Session::set_current_session(sev->session()); sev->session()->set_current_request(sev); - SQLStageEvent *sql_event = new SQLStageEvent(sev, sql); - (void)handle_sql(sql_event); + SQLStageEvent sql_event(sev, sql); + (void)handle_sql(&sql_event); Communicator *communicator = sev->get_communicator(); bool need_disconnect = false;