From: Theo Buehler Subject: Re: Fix memory leaks in ldapd caused by missing ober_free_elements calls To: Anton Kasimov Cc: tech@openbsd.org Date: Sun, 11 May 2025 17:42:21 +0200 On Sun, May 11, 2025 at 04:45:46PM +0200, Anton Kasimov wrote: > Hi Theo, > > Thanks for the review and your feedback. > > The ldap_free_elements_and_respond() helper was added to avoid > repeating the cleanup pattern and to follow the style of > ldap_respond(). That said, I understand your preference for > inlining, especially since it's only needed in a few places. Ultimately it is a matter of taste. ldap_respond() at least does something with the argument it frees and significantly simplifies its many callers. > I've updated the code accordingly. The revised diff is attached. Thanks, committed.