Fixes to Coverity defects.

This commit is contained in:
Markus Makela
2015-04-16 19:41:49 +03:00
parent cceca1b428
commit 1b3af7d61f
9 changed files with 32 additions and 35 deletions

View File

@ -973,12 +973,10 @@ bool parse_rule(char* rule, FW_INSTANCE* instance)
tok = strtok_r(NULL, " ,",&saveptr);
TIMERANGE *tr = NULL;
bool not_valid = false;
while(tok){
if(!check_time(tok))
{
not_valid = true;
skygw_log_write(LOGFILE_ERROR,"dbfwfilter: Rule parsing failed, malformed time definition: %s",tok);
rval = false;
goto retblock;
@ -1004,11 +1002,6 @@ bool parse_rule(char* rule, FW_INSTANCE* instance)
}
ruledef->active = tr;
if(not_valid)
{
continue;
}
}
else if(strcmp(tok,"regex") == 0)
{

View File

@ -1047,8 +1047,7 @@ clientReply (FILTER* instance, void *session, GWBUF *reply)
}
else
{
if(complete)
gwbuf_free(complete);
gwbuf_free(complete);
}
my_session->replies[branch]++;
@ -1264,7 +1263,7 @@ int internal_route(DCB* dcb)
GWBUF* clone_query(TEE_INSTANCE* my_instance, TEE_SESSION* my_session, GWBUF* buffer)
{
GWBUF* clone = NULL;
int length, residual;
int length, residual = 0;
char* ptr;
if (my_session->branch_session &&