log_manager.cc

Declared program_invocation_name, and program_invocation_short_name. They are used as identifier strings in syslog logging in cases where log_manager is not initialized explicitly and/or the caller hasn't specified program name as one of the arguments in arguments array.

	Fixed memory corruption. Length of sequence number of file name was calculated to as one too short and one byte was written to unallocated memory.

	Freed also the linkpath in cases where at least one of the log files is written to shm and a symlink is added to log directory.

mysql_client.c
	Added debug check for protocol pointer because of memory issues in mysql_client.c
This commit is contained in:
vraatikka
2013-11-13 22:08:10 +02:00
parent 1a3fa578da
commit 1c96824cb3
2 changed files with 23 additions and 5 deletions

View File

@ -361,6 +361,7 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) {
CHK_DCB(dcb);
protocol = DCB_PROTOCOL(dcb, MySQLProtocol);
CHK_PROTOCOL(protocol);
client_data = (MYSQL_session *)calloc(1, sizeof(MYSQL_session));
dcb->data = client_data;