mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Add missing isc_refcount_destroy and lock the socket ISC_LISTS in destroy()
This commit is contained in:
parent
6f3fdf36b4
commit
d35739d516
1 changed files with 3 additions and 1 deletions
|
|
@ -1832,15 +1832,17 @@ destroy(isc__socket_t **sockp) {
|
|||
isc__socketmgr_t *manager = sock->manager;
|
||||
isc__socketthread_t *thread = NULL;
|
||||
|
||||
isc_refcount_destroy(&sock->references);
|
||||
|
||||
socket_log(sock, NULL, CREATION, "destroying");
|
||||
|
||||
LOCK(&sock->lock);
|
||||
INSIST(ISC_LIST_EMPTY(sock->connect_list));
|
||||
INSIST(ISC_LIST_EMPTY(sock->accept_list));
|
||||
INSIST(ISC_LIST_EMPTY(sock->recv_list));
|
||||
INSIST(ISC_LIST_EMPTY(sock->send_list));
|
||||
INSIST(sock->fd >= -1 && sock->fd < (int)manager->maxsocks);
|
||||
|
||||
LOCK(&sock->lock);
|
||||
if (sock->fd >= 0) {
|
||||
fd = sock->fd;
|
||||
thread = &manager->threads[sock->threadid];
|
||||
|
|
|
|||
Loading…
Reference in a new issue