]> git.ipfire.org Git - thirdparty/bind9.git/commit
Stop leaking mutex in nmworker and cond in nm socket
authorOndřej Surý <ondrej@sury.org>
Mon, 6 Dec 2021 10:10:17 +0000 (11:10 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 8 Dec 2021 17:19:37 +0000 (18:19 +0100)
commitd5cdcf924a6b94cd501e33b0963dd787a72af1f8
tree1fae83947a25164f46d8446f389f646973fdc0b4
parent4ea50a810c89bb539c6ee0a36bf47758d936219e
Stop leaking mutex in nmworker and cond in nm socket

On FreeBSD, the pthread primitives are not solely allocated on stack,
but part of the object lives on the heap.  Missing pthread_*_destroy
causes the heap memory to grow and in case of fast lived object it's
possible to run out-of-memory.

Properly destroy the leaking mutex (worker->lock) and
the leaking condition (sock->cond).

(cherry picked from commit 57d0fabaddf0e7ac297a046b084df8fb22d54d51)
lib/isc/netmgr/netmgr.c