Bug 166 - NULL pointer dereferenced if candidate server is NULL
This commit is contained in:
parent
2499378af9
commit
4e41fc49f5
@ -264,6 +264,15 @@ static void* newSession(
|
||||
}
|
||||
} /* for */
|
||||
|
||||
if (candidate == NULL)
|
||||
{
|
||||
|
||||
skygw_log_write_flush(LOGFILE_MESSAGE,
|
||||
"No suitable servers found for connection.");
|
||||
free(client);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (inst->master == NULL) {
|
||||
inst->master = inst->servers[i-1];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user