Fixed coverity defects.

This commit is contained in:
Markus Makela 2015-04-03 07:56:45 +03:00
parent a65c790c3b
commit e13ab6689d
2 changed files with 3 additions and 2 deletions

View File

@ -1355,13 +1355,14 @@ createInstance(char **options, FILTER_PARAMETER **params)
free(filename);
/**Apply the rules to users*/
ptr = my_instance->userstrings;
if(ptr == NULL)
{
skygw_log_write(LOGFILE_ERROR,"dbfwfilter: No 'users' line found.");
err = true;
goto retblock;
}
ptr = my_instance->userstrings;
while(ptr){

View File

@ -4167,7 +4167,7 @@ static bool change_current_db(
goto reply_error;
}
strcpy(rses->rses_mysql_session->db,tok);
strncpy(rses->rses_mysql_session->db,tok,MYSQL_DATABASE_MAXLEN);
free(query);
query = NULL;