Fixed a possible memory leak when session command history limits are used.
This commit is contained in:
@ -290,6 +290,7 @@ struct router_client_session {
|
||||
int rses_capabilities; /*< input type, for example */
|
||||
bool rses_autocommit_enabled;
|
||||
bool rses_transaction_active;
|
||||
DCB* client_dcb;
|
||||
#if defined(PREP_STMT_CACHING)
|
||||
HASHTABLE* rses_prep_stmt[2];
|
||||
#endif
|
||||
|
@ -790,6 +790,7 @@ static void* newSession(
|
||||
#endif
|
||||
|
||||
client_rses->router = router;
|
||||
client_rses->client_dcb = session->client;
|
||||
/**
|
||||
* If service config has been changed, reload config from service to
|
||||
* router instance first.
|
||||
@ -4355,8 +4356,10 @@ static bool route_session_write(
|
||||
LOGFILE_TRACE,
|
||||
"Router session exceeded session command history limit. "
|
||||
"Closing router session. <")));
|
||||
router_cli_ses->rses_closed = true;
|
||||
gwbuf_free(querybuf);
|
||||
rses_end_locked_router_action(router_cli_ses);
|
||||
router_cli_ses->client_dcb->func.hangup(router_cli_ses->client_dcb);
|
||||
|
||||
goto return_succp;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user