mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-17 08:03:44 -04:00
TLS: sometimes TCP conn. handle might be NULL on when connecting
In some cases - in particular, in case of errors, NULL might be passed
to a connection callback instead of a handle that could have led to
an abort. This commit ensures that such a situation will not occur.
The issue was found when working on the loopmgr branch.
(cherry picked from commit ac4fb34f18)
This commit is contained in:
parent
c44633feb2
commit
0754def85d
1 changed files with 2 additions and 1 deletions
|
|
@ -957,13 +957,14 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t result, void *cbarg) {
|
|||
isc_nmhandle_t *tlshandle = NULL;
|
||||
|
||||
REQUIRE(VALID_NMSOCK(tlssock));
|
||||
REQUIRE(VALID_NMHANDLE(handle));
|
||||
|
||||
tlssock->tid = isc_nm_tid();
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
INSIST(VALID_NMHANDLE(handle));
|
||||
|
||||
tlssock->iface = handle->sock->iface;
|
||||
tlssock->peer = handle->sock->peer;
|
||||
if (isc__nm_closing(tlssock)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue