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