mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Remove reference count REQUIRE in isc_nm_read()
Previously isc_nm_read() required references on the handle to be at least 2, under the assumption that it would only ever be called from a connect or accept callback. however, it can also be called from a read callback, in which case the reference count might be only 1.
This commit is contained in:
@@ -2527,13 +2527,6 @@ void
|
||||
isc_nm_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb, void *cbarg) {
|
||||
REQUIRE(VALID_NMHANDLE(handle));
|
||||
|
||||
/*
|
||||
* This is always called via callback (from accept or connect), and
|
||||
* caller must attach to the handle, so the references always need to be
|
||||
* at least 2.
|
||||
*/
|
||||
REQUIRE(isc_refcount_current(&handle->references) >= 2);
|
||||
|
||||
switch (handle->sock->type) {
|
||||
case isc_nm_udpsocket:
|
||||
isc__nm_udp_read(handle, cb, cbarg);
|
||||
|
Reference in New Issue
Block a user