dns/bind916: fix runnaway memory leak

Obtained from:	https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/5626
This commit is contained in:
Mathieu Arnold 2021-12-15 16:58:37 +01:00
parent 60c087659a
commit 925b730fbf
No known key found for this signature in database
GPG Key ID: 29EB0902911D7E02
2 changed files with 22 additions and 1 deletions

View File

@ -7,7 +7,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/}
PORTREVISION= 0
.else
# dns/bind916 here
PORTREVISION= 0
PORTREVISION= 1
.endif
CATEGORIES= dns net
MASTER_SITES= ISC/bind9/${ISCVERSION}

View File

@ -0,0 +1,21 @@
--- lib/isc/netmgr/netmgr.c.orig 2021-12-07 12:24:49 UTC
+++ lib/isc/netmgr/netmgr.c
@@ -425,6 +425,7 @@ nm_destroy(isc_nm_t **mgr0) {
isc_mempool_put(mgr->evpool, ievent);
}
isc_condition_destroy(&worker->cond_prio);
+ isc_mutex_destroy(&worker->lock);
r = uv_loop_close(&worker->loop);
INSIST(r == 0);
@@ -1267,8 +1268,9 @@ nmsocket_cleanup(isc_nmsocket_t *sock, bool dofree FLA
isc_mem_free(sock->mgr->mctx, sock->ah_frees);
isc_mem_free(sock->mgr->mctx, sock->ah_handles);
- isc_mutex_destroy(&sock->lock);
isc_condition_destroy(&sock->scond);
+ isc_condition_destroy(&sock->cond);
+ isc_mutex_destroy(&sock->lock);
#ifdef NETMGR_TRACE
LOCK(&sock->mgr->lock);
ISC_LIST_UNLINK(sock->mgr->active_sockets, sock, active_link);