mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 10:40:38 +01:00
Fix a case of deleted memory modification
cnctAuth and port->port_srv_auth point to the same object so useResponse must not be assigned if the object is deleted.
This commit is contained in:
parent
fc71044eb6
commit
7e031f658b
@ -1989,13 +1989,15 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
|
||||
{
|
||||
ConnectAuth* cnctAuth = FB_NEW ConnectAuth(port, id);
|
||||
port->port_srv_auth = cnctAuth;
|
||||
if (port->port_srv_auth->authenticate(send, ServerAuth::AUTH_COND_ACCEPT))
|
||||
|
||||
if (cnctAuth->authenticate(send, ServerAuth::AUTH_COND_ACCEPT))
|
||||
{
|
||||
delete port->port_srv_auth;
|
||||
delete cnctAuth;
|
||||
port->port_srv_auth = NULL;
|
||||
}
|
||||
else
|
||||
cnctAuth->useResponse = true;
|
||||
|
||||
cnctAuth->useResponse = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user