8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 14:03:07 +01:00

Fixed possible event handler crashes during detach.

This commit is contained in:
dimitr 2005-05-31 16:10:15 +00:00
parent 15b0ca462b
commit 054af913ae

View File

@ -5345,10 +5345,18 @@ static void disconnect( rem_port* port)
REMOTE_free_packet(port, packet);
}
// Clear context reference for the associated event handler
// to avoid SEGV during shutdown
if (port->port_async) {
port->port_async->port_context = NULL;
}
/* Perform physical network disconnect and release
memory for remote database context. */
port->disconnect();
if (rdb) {
ALLR_release(rdb);
}