MXS-2556 Don't crash if authenticator not found
This commit is contained in:
@ -176,14 +176,15 @@ Server* Server::server_alloc(const char* name, const MXS_CONFIG_PARAMETER& param
|
|||||||
|
|
||||||
if (authenticator.empty())
|
if (authenticator.empty())
|
||||||
{
|
{
|
||||||
authenticator = get_default_authenticator(protocol.c_str());
|
const char* zAuthenticator = get_default_authenticator(protocol.c_str());
|
||||||
if (authenticator.empty())
|
if (!zAuthenticator)
|
||||||
{
|
{
|
||||||
MXS_ERROR("No authenticator defined for server '%s' and no default "
|
MXS_ERROR("No authenticator defined for server '%s' and no default "
|
||||||
"authenticator for protocol '%s'.",
|
"authenticator for protocol '%s'.",
|
||||||
name, protocol.c_str());
|
name, protocol.c_str());
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
authenticator = zAuthenticator;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* auth_instance = NULL;
|
void* auth_instance = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user