From: Theo Buehler Subject: Re: bgpd: fix memory leak of CH hash tables To: tech@openbsd.org Date: Sat, 13 Dec 2025 13:45:24 +0100 On Sat, Dec 13, 2025 at 01:10:11PM +0100, Claudio Jeker wrote: > The double free fix from jsg@ made me wonder why I did not spot that one > earlier. The reason is that CH_DESTROY was not defined and nothing called > this cleanup function. > > Fix memory leak of the CH tables used by the per-peer pending queues. > > Define CH_DESTROY() and use it in peer_delete() via adjout_peer_free() > to cleanup the lookup tables used by the pending attribute and prefix > queues. Also rename adjout_prefix_flush_pending() to > adjout_peer_flush_pending() since that function does no longer work > with struct adjout_prefix entries. Reads fine. ok