mysql_client.c:gw_error_client_event & gw_client_hangup_event: added session state check, if session is already closing, don't start redundant call to dcb_close.

mysql_common.c:mysql_protocol_done: added protocol state check. Used not to check it which caused double free of allocated memory.
This commit is contained in:
VilhoRaatikka
2014-08-14 15:15:22 +03:00
parent d3a79ce7c4
commit 77e5525436
5 changed files with 36 additions and 17 deletions

View File

@ -1548,7 +1548,7 @@ static void clientReply (
(uint8_t *)GWBUF_DATA((scur->scmd_cur_cmd->my_sescmd_buf));
size_t len = MYSQL_GET_PACKET_LEN(buf);
char* cmdstr = (char *)malloc(len+1);
/** data+termination character == len */
snprintf(cmdstr, len, "%s", &buf[5]);
LOGIF(LE, (skygw_log_write_flush(